package org.ing.sisval.gui.control;

import java.beans.PropertyVetoException;
import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ImageIcon;
import javax.swing.JFileChooser;
import javax.swing.JInternalFrame;
import javax.swing.JOptionPane;
import javax.swing.filechooser.FileFilter;
import org.ing.sisval.be.BEAsignacionDistribucion;
import org.ing.sisval.be.BEAsignacionInfraestructura;
import org.ing.sisval.be.BEContenedorComplementario;
import org.ing.sisval.be.BEContenedorEdificacion;
import org.ing.sisval.be.BEDistribucion;
import org.ing.sisval.be.BEEspecificacionAsignada;
import org.ing.sisval.be.BEEspecificacionTecnica;
import org.ing.sisval.be.BEInfraestructura;
import org.ing.sisval.be.BEPropiedad;

import org.ing.sisval.be.BETerreno;
import org.ing.sisval.be.BEUbigeo;
import org.ing.sisval.be.BEValuacionComplementario;
import org.ing.sisval.be.BEValuacionEdificacion;
import org.ing.sisval.bl.BLAsignacionDistribucion;
import org.ing.sisval.bl.BLAsignacionInfraestructura;
import org.ing.sisval.bl.BLContenedorComplementario;
import org.ing.sisval.bl.BLContenedorEdificacion;
import org.ing.sisval.bl.BLDistribucion;
import org.ing.sisval.bl.BLEspecificacionAsignada;
import org.ing.sisval.bl.BLEspecificacionTecnica;

import org.ing.sisval.bl.BLInfraestructura;
import org.ing.sisval.bl.BLPropiedad;

import org.ing.sisval.bl.BLTerreno;
import org.ing.sisval.bl.BLValuacionComplementario;
import org.ing.sisval.bl.BLValuacionEdificacion;
import org.ing.sisval.ds.DSUtil;
import org.ing.sisval.gui.JFPrincipal;
import org.ing.sisval.gui.control.model.ModeloDistribucionAsignado;
import org.ing.sisval.gui.control.model.ModeloEspecificacionTecnicaAsignada;
import org.ing.sisval.gui.control.model.ModeloInfraestructuraAsignado;
import org.ing.sisval.gui.control.model.ModeloPropiedad;
import org.ing.sisval.gui.control.model.ModeloValuacionComplementario;
import org.ing.sisval.gui.control.model.ModeloValuacionEdificacion;
import org.ing.sisval.util.UtilUbigeo;
import org.rx.cr.gui.JInternalFrameUC;
import org.rx.cr.report.ReportGeneric;
import org.rx.cr.util.Utilitarios;
import static org.rx.cr.util.Utilitarios.ALFABETICO_CM;
import static org.rx.cr.util.Utilitarios.addCharacterValidatorEvent;
import static org.rx.cr.util.Utilitarios.addEnterDoclickEvent;
import static org.rx.cr.util.Utilitarios.alinearDatosColumnaTablaCentro;
import static org.rx.cr.util.Utilitarios.disableComponent;
import static org.rx.cr.util.Utilitarios.formateaAnchoColumnaTabla;
import static org.rx.cr.util.Utilitarios.getFileExtencion;
import static org.rx.cr.util.Utilitarios.isDatosLlenos;
import static org.rx.cr.util.Utilitarios.resizeIcon;

public class JIFAdministrarPropiedad extends JInternalFrameUC {

    JFPrincipal parent;
    BEPropiedad be;
    BLPropiedad bl;

    //cargar terreno
    BETerreno bet;
    BLTerreno blt;

    ModeloPropiedad model;
    UtilUbigeo utilUbigeo;

    JIFValuacionEdificacion jifValuacionEdificacion;
    JIFValuacionComplementaria jifValuacionComplementaria;
    JIFValuacionTerreno jifValuacionTerreno;

    //asignar distribucion
    BEAsignacionDistribucion beAsignacionDistribucion;
    BLAsignacionDistribucion blAsignacionDistribucion;
    BEDistribucion beDistribucion;
    BLDistribucion blDistribucion;
    ModeloDistribucionAsignado modeloDistribucionAsignado;
    JIFAsignarDistribucion jifAdministrarDistribucion;

    //asignar infraestructura
    BEAsignacionInfraestructura beAsignacionInfraestructura;
    BLAsignacionInfraestructura blAsignacionInfraestructura;
    BEInfraestructura beInfraestructura;
    BLInfraestructura blInfraestructura;
    ModeloInfraestructuraAsignado modeloInfraestructuraAsignado;
    JIFAsignarInfraestructura jifAdministrarInfraestructura;

    //asignarEspecificacionTecnica
    BEEspecificacionAsignada beEspecificacionAsignada;
    BLEspecificacionAsignada blEspecificacionAsignada;
    BEEspecificacionTecnica beEspecificacionTecnica;
    BLEspecificacionTecnica blEspecificacionTecnica;
    ModeloEspecificacionTecnicaAsignada modeloEspecificacionTecnicaAsignada;
    JIFAsignarEspecificaciónTecnica jifAsignarEspecificaciónTecnica;

    ///contenedor edificacion    
    BEContenedorEdificacion beContenedorEdificacion;
    BLContenedorEdificacion blContenedorEdificacion;
    BEValuacionEdificacion beve;
    BLValuacionEdificacion blve;
    ModeloValuacionEdificacion modeloValuacionEdificacion;

    //contener complementario
    BEContenedorComplementario beContenedorComplementario;
    BLContenedorComplementario blContenedorComplementario;
    BEValuacionComplementario bevc;
    BLValuacionComplementario blvc;
    ModeloValuacionComplementario modeloValuacionComplementario;

    private JFileChooser jfc;
    private File foto1;
    private File foto2;
    private File foto3;
    private File foto4;
    private File foto5;
    private File foto6;
    private File foto7;
    private File foto8;
    private File foto9;
    private File foto10;
    private File foto11;
    private File foto12;
    private static final int ARCH_FOTOGRAFIA1 = 1, ARCH_FOTOGRAFIA2 = 2, ARCH_FOTOGRAFIA3 = 3,
            ARCH_FOTOGRAFIA4 = 4, ARCH_FOTOGRAFIA5 = 5, ARCH_FOTOGRAFIA6 = 6,
            ARCH_FOTOGRAFIA7 = 7, ARCH_FOTOGRAFIA8 = 8, ARCH_FOTOGRAFIA9 = 9,
            ARCH_FOTOGRAFIA10 = 10, ARCH_FOTOGRAFIA11 = 11, ARCH_FOTOGRAFIA12 = 12;
    int idInicio;

    /**
     * Creates new form JIFPropiedad
     */
    public JIFAdministrarPropiedad(JFPrincipal parent) {
        initComponents();
        this.parent = parent;
        model = new ModeloPropiedad();
        jtPropiedad.setModel(model);
        personalizaVistaTabla();
        utilUbigeo = new UtilUbigeo(parent.getConf());
        bl = new BLPropiedad(parent.getConf());
        blt = new BLTerreno(parent.getConf());
        blve = new BLValuacionEdificacion(parent.getConf());
        blvc = new BLValuacionComplementario(parent.getConf());
        blAsignacionDistribucion = new BLAsignacionDistribucion(parent.getConf());
        blAsignacionInfraestructura = new BLAsignacionInfraestructura(parent.getConf());
        blEspecificacionAsignada = new BLEspecificacionAsignada(parent.getConf());
        blInfraestructura = new BLInfraestructura(parent.getConf());
        blDistribucion = new BLDistribucion(parent.getConf());
        blEspecificacionTecnica = new BLEspecificacionTecnica(parent.getConf());
        blContenedorComplementario = new BLContenedorComplementario(parent.getConf());
        blContenedorEdificacion = new BLContenedorEdificacion(parent.getConf());

        jifValuacionTerreno = new JIFValuacionTerreno(parent);

        jifValuacionEdificacion = new JIFValuacionEdificacion(parent);
        jifValuacionComplementaria = new JIFValuacionComplementaria(parent);
        modeloValuacionComplementario = new ModeloValuacionComplementario();
        jtComplementario.setModel(modeloValuacionComplementario);

        modeloValuacionEdificacion = new ModeloValuacionEdificacion();
        jtEdificacion.setModel(modeloValuacionEdificacion);

        modeloDistribucionAsignado = new ModeloDistribucionAsignado();
        //jtDistribucion.setEditingColumn(1);
        jtDistribucion.setModel(modeloDistribucionAsignado);
        jifAdministrarDistribucion = new JIFAsignarDistribucion(parent);

        modeloInfraestructuraAsignado = new ModeloInfraestructuraAsignado();
        jtInfraestructura.setModel(modeloInfraestructuraAsignado);
        jifAdministrarInfraestructura = new JIFAsignarInfraestructura(parent);

        modeloEspecificacionTecnicaAsignada = new ModeloEspecificacionTecnicaAsignada();
        jtEspecificacionTecnica.setModel(modeloEspecificacionTecnicaAsignada);
        jifAsignarEspecificaciónTecnica = new JIFAsignarEspecificaciónTecnica(parent);

        defaultFoto1();
        defaultFoto2();
        defaultFoto3();
        defaultFoto4();
        defaultFoto5();
        defaultFoto6();
        defaultFoto7();
        defaultFoto8();
        defaultFoto9();
        defaultFoto10();
        defaultFoto11();
        defaultFoto12();

        jfc = new JFileChooser();
        jfc.setFileFilter(new FileFilter() {
            //<editor-fold defaultstate="collapsed" desc="Filter">
            @Override
            public boolean accept(File f) {
                if (f.isDirectory()) {
                    return true;
                } else if (f.isFile()) {
                    if (getFileExtencion(f.getName().toLowerCase()).equals("jpg")
                            || getFileExtencion(f.getName().toLowerCase()).equals("jpeg")
                            || getFileExtencion(f.getName().toLowerCase()).equals("jpe")
                            || getFileExtencion(f.getName().toLowerCase()).equals("jfif")
                            || getFileExtencion(f.getName().toLowerCase()).equals("png")
                            || getFileExtencion(f.getName().toLowerCase()).equals("gif")
                            || getFileExtencion(f.getName().toLowerCase()).equals("bmp")) {
                        return true;
                    } else {
                        return false;
                    }
                } else {
                    return false;
                }
            }

            @Override
            public String getDescription() {
                return "Archivos Soportados(*.jpg,*.jpeg,*,jpe,*.jfif,*.png,*.gif,*.bmp)";
            }
            //</editor-fold>
        });
        jfc.setFileSelectionMode(JFileChooser.FILES_ONLY);
        jfc.setApproveButtonText("Seleccionar");
        jdcFecha.setDate(Calendar.getInstance().getTime());
        try {
            idInicio = bl.obtenerUltimoId();
            System.out.println("ultimo id " + bl.obtenerUltimoId());
        } catch (Exception ex) {
            Logger.getLogger(JIFAdministrarPropiedad.class.getName()).log(Level.SEVERE, null, ex);
        }

        try {
            _listarBEs();
        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, "Error al listar la lista de valores complementarios." + e, "Atención.", JOptionPane.INFORMATION_MESSAGE);

        }
        _init();

    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        bgObjetivo = new javax.swing.ButtonGroup();
        bgMetodologia = new javax.swing.ButtonGroup();
        bgTasacion = new javax.swing.ButtonGroup();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel23 = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jcbDepartamento = new javax.swing.JComboBox();
        jLabel2 = new javax.swing.JLabel();
        jcbProvincia = new javax.swing.JComboBox();
        jcbDistrito = new javax.swing.JComboBox();
        jLabel3 = new javax.swing.JLabel();
        txfPropietario1 = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        txfDireccion = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        txfPropietario2 = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        txfSolicitante = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        txfPerito = new javax.swing.JTextField();
        jLabel14 = new javax.swing.JLabel();
        txfRegistroPerito = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        jdcFecha = new com.toedter.calendar.JDateChooser();
        jLabel19 = new javax.swing.JLabel();
        jTabbedPane2 = new javax.swing.JTabbedPane();
        jPanel24 = new javax.swing.JPanel();
        jrbPredetObj = new javax.swing.JRadioButton();
        jrbAgregarObj = new javax.swing.JRadioButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        txaObjetivo = new javax.swing.JTextArea();
        jPanel25 = new javax.swing.JPanel();
        jrbAgregarMeto = new javax.swing.JRadioButton();
        jrbPredetMeto = new javax.swing.JRadioButton();
        jScrollPane3 = new javax.swing.JScrollPane();
        txaMetodologia = new javax.swing.JTextArea();
        jPanel14 = new javax.swing.JPanel();
        jScrollPane11 = new javax.swing.JScrollPane();
        txaObservaciones = new javax.swing.JTextArea();
        jbAgregar = new javax.swing.JButton();
        jbSalir = new javax.swing.JButton();
        jbEditar = new javax.swing.JButton();
        jbGuardar = new javax.swing.JButton();
        jbCancelar = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        txfBuscar = new javax.swing.JTextField();
        jbBuscar = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        jtPropiedad = new javax.swing.JTable();
        jPanel18 = new javax.swing.JPanel();
        jpLindero = new javax.swing.JPanel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        jScrollPane26 = new javax.swing.JScrollPane();
        txaLinderoFrente = new javax.swing.JTextArea();
        jScrollPane27 = new javax.swing.JScrollPane();
        txaLinderoDerecha = new javax.swing.JTextArea();
        jScrollPane28 = new javax.swing.JScrollPane();
        txaLinderoIzquierda = new javax.swing.JTextArea();
        jScrollPane29 = new javax.swing.JScrollPane();
        txaLinderoFondo = new javax.swing.JTextArea();
        jPanel7 = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        txaZonificacion = new javax.swing.JTextArea();
        jPanel6 = new javax.swing.JPanel();
        jLabel25 = new javax.swing.JLabel();
        txfDensidad = new javax.swing.JTextField();
        jLabel26 = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        txfUsoUrbano = new javax.swing.JTextField();
        jLabel28 = new javax.swing.JLabel();
        jScrollPane30 = new javax.swing.JScrollPane();
        txaViaAcceso = new javax.swing.JTextArea();
        jScrollPane31 = new javax.swing.JScrollPane();
        txaPredioCircundante = new javax.swing.JTextArea();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane32 = new javax.swing.JScrollPane();
        txaInscripcion = new javax.swing.JTextArea();
        jPanel19 = new javax.swing.JPanel();
        jPanel22 = new javax.swing.JPanel();
        jScrollPane6 = new javax.swing.JScrollPane();
        txaDescripcion = new javax.swing.JTextArea();
        jPanel5 = new javax.swing.JPanel();
        jScrollPane7 = new javax.swing.JScrollPane();
        jtDistribucion = new javax.swing.JTable();
        jbAgregarDistribucion = new javax.swing.JButton();
        jbQuitarDistribucion = new javax.swing.JButton();
        jPanel13 = new javax.swing.JPanel();
        jScrollPane10 = new javax.swing.JScrollPane();
        jtEspecificacionTecnica = new javax.swing.JTable();
        jbQuitarEspecificaconTecnica = new javax.swing.JButton();
        jbEspecificacionTecnica = new javax.swing.JButton();
        jPanel4 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        jtInfraestructura = new javax.swing.JTable();
        jbAgregarInfraestructura = new javax.swing.JButton();
        jbQuitarInfraestructura = new javax.swing.JButton();
        jPanel20 = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jPanel9 = new javax.swing.JPanel();
        txfTerreno = new javax.swing.JTextField();
        jbCalcularTerreno = new javax.swing.JButton();
        jLabel6 = new javax.swing.JLabel();
        jPanel10 = new javax.swing.JPanel();
        jScrollPane8 = new javax.swing.JScrollPane();
        jtComplementario = new javax.swing.JTable();
        jbaAgregarComplementario = new javax.swing.JButton();
        jLabel7 = new javax.swing.JLabel();
        txfComplementario = new javax.swing.JTextField();
        jbCalcularComplementario = new javax.swing.JButton();
        jbQuitarValuacionComplementaria = new javax.swing.JButton();
        jPanel12 = new javax.swing.JPanel();
        jLabel10 = new javax.swing.JLabel();
        txfValorTotalPredio = new javax.swing.JTextField();
        txfPerimetro = new javax.swing.JTextField();
        jcbEstado = new javax.swing.JComboBox();
        jLabel9 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        jbCalcularPredio = new javax.swing.JButton();
        jPanel11 = new javax.swing.JPanel();
        jbAgregarEdificacion = new javax.swing.JButton();
        jScrollPane9 = new javax.swing.JScrollPane();
        jtEdificacion = new javax.swing.JTable();
        jLabel8 = new javax.swing.JLabel();
        jbCalcularEdificacion = new javax.swing.JButton();
        txfEdificacion = new javax.swing.JTextField();
        jbQuitarValuacionEdificacion = new javax.swing.JButton();
        jPanel16 = new javax.swing.JPanel();
        jrbPredetTasacion = new javax.swing.JRadioButton();
        jrbAgregarTasacion = new javax.swing.JRadioButton();
        jScrollPane12 = new javax.swing.JScrollPane();
        txaTasacion = new javax.swing.JTextArea();
        jPanel21 = new javax.swing.JPanel();
        jPanel15 = new javax.swing.JPanel();
        jPanel17 = new javax.swing.JPanel();
        lblFoto1 = new javax.swing.JLabel();
        jbCargarFoto1 = new javax.swing.JButton();
        jScrollPane14 = new javax.swing.JScrollPane();
        jtxaImagen1 = new javax.swing.JTextArea();
        jPanel26 = new javax.swing.JPanel();
        lblFoto4 = new javax.swing.JLabel();
        jbCargarFoto4 = new javax.swing.JButton();
        jScrollPane17 = new javax.swing.JScrollPane();
        jtxaImagen4 = new javax.swing.JTextArea();
        jPanel27 = new javax.swing.JPanel();
        jScrollPane20 = new javax.swing.JScrollPane();
        jtxaImagen7 = new javax.swing.JTextArea();
        lblFoto10 = new javax.swing.JLabel();
        jbCargarFoto10 = new javax.swing.JButton();
        jPanel28 = new javax.swing.JPanel();
        jScrollPane23 = new javax.swing.JScrollPane();
        jtxaImagen10 = new javax.swing.JTextArea();
        lblFoto7 = new javax.swing.JLabel();
        jbCargarFoto7 = new javax.swing.JButton();
        jPanel29 = new javax.swing.JPanel();
        jScrollPane15 = new javax.swing.JScrollPane();
        jtxaImagen2 = new javax.swing.JTextArea();
        lblFoto2 = new javax.swing.JLabel();
        jbCargarFoto2 = new javax.swing.JButton();
        jPanel30 = new javax.swing.JPanel();
        lblFoto5 = new javax.swing.JLabel();
        jScrollPane18 = new javax.swing.JScrollPane();
        jtxaImagen5 = new javax.swing.JTextArea();
        jbCargarFoto5 = new javax.swing.JButton();
        jPanel31 = new javax.swing.JPanel();
        jbCargarFoto3 = new javax.swing.JButton();
        jScrollPane16 = new javax.swing.JScrollPane();
        jtxaImagen3 = new javax.swing.JTextArea();
        lblFoto3 = new javax.swing.JLabel();
        jPanel32 = new javax.swing.JPanel();
        lblFoto8 = new javax.swing.JLabel();
        jbCargarFoto8 = new javax.swing.JButton();
        jScrollPane21 = new javax.swing.JScrollPane();
        jtxaImagen8 = new javax.swing.JTextArea();
        jPanel33 = new javax.swing.JPanel();
        jScrollPane24 = new javax.swing.JScrollPane();
        jtxaImagen11 = new javax.swing.JTextArea();
        lblFoto11 = new javax.swing.JLabel();
        jbCargarFoto11 = new javax.swing.JButton();
        jPanel34 = new javax.swing.JPanel();
        jScrollPane19 = new javax.swing.JScrollPane();
        jtxaImagen6 = new javax.swing.JTextArea();
        lblFoto6 = new javax.swing.JLabel();
        jbCargarFoto6 = new javax.swing.JButton();
        jPanel35 = new javax.swing.JPanel();
        jScrollPane22 = new javax.swing.JScrollPane();
        jtxaImagen9 = new javax.swing.JTextArea();
        jbCargarFoto9 = new javax.swing.JButton();
        lblFoto9 = new javax.swing.JLabel();
        jPanel36 = new javax.swing.JPanel();
        jbCargarFoto12 = new javax.swing.JButton();
        jScrollPane25 = new javax.swing.JScrollPane();
        jtxaImagen12 = new javax.swing.JTextArea();
        lblFoto12 = new javax.swing.JLabel();

        setClosable(true);
        setIconifiable(true);
        setTitle("ADMINISTRACIÓN DE PROPIEDAD");

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Datos", javax.swing.border.TitledBorder.LEFT, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        jLabel1.setText("Departamento :");

        jcbDepartamento.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        jcbDepartamento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcbDepartamentoActionPerformed(evt);
            }
        });

        jLabel2.setText("Provincia :");

        jcbProvincia.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        jcbProvincia.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcbProvinciaActionPerformed(evt);
            }
        });

        jcbDistrito.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        jcbDistrito.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcbDistritoActionPerformed(evt);
            }
        });

        jLabel3.setText("Distrito :");

        txfPropietario1.setMaximumSize(new java.awt.Dimension(250, 250));

        jLabel4.setText("Propietario :");

        jLabel5.setText("Dirección :");

        jLabel12.setText("Propietario * :");

        jLabel13.setText("Solicitante :");

        jLabel14.setText("Perito :");

        jLabel15.setText("Registro del perito :");

        jdcFecha.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                jdcFechaPropertyChange(evt);
            }
        });

        jLabel19.setText("Fecha :");

        jPanel24.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        bgObjetivo.add(jrbPredetObj);
        jrbPredetObj.setText("Predeterminado");
        jrbPredetObj.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jrbPredetObjActionPerformed(evt);
            }
        });
        jrbPredetObj.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                jrbPredetObjPropertyChange(evt);
            }
        });

        bgObjetivo.add(jrbAgregarObj);
        jrbAgregarObj.setText("Agregar");
        jrbAgregarObj.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                jrbAgregarObjPropertyChange(evt);
            }
        });

        txaObjetivo.setColumns(20);
        txaObjetivo.setLineWrap(true);
        txaObjetivo.setRows(5);
        txaObjetivo.setToolTipText("");
        jScrollPane2.setViewportView(txaObjetivo);

        javax.swing.GroupLayout jPanel24Layout = new javax.swing.GroupLayout(jPanel24);
        jPanel24.setLayout(jPanel24Layout);
        jPanel24Layout.setHorizontalGroup(
            jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel24Layout.createSequentialGroup()
                .addComponent(jrbPredetObj)
                .addGap(18, 18, 18)
                .addComponent(jrbAgregarObj)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addComponent(jScrollPane2)
        );
        jPanel24Layout.setVerticalGroup(
            jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel24Layout.createSequentialGroup()
                .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jrbPredetObj)
                    .addComponent(jrbAgregarObj))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE))
        );

        jTabbedPane2.addTab("Objetivo", jPanel24);

        jPanel25.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        bgMetodologia.add(jrbAgregarMeto);
        jrbAgregarMeto.setText("Agregar");
        jrbAgregarMeto.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                jrbAgregarMetoPropertyChange(evt);
            }
        });

        bgMetodologia.add(jrbPredetMeto);
        jrbPredetMeto.setText("Predeterminado");
        jrbPredetMeto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jrbPredetMetoActionPerformed(evt);
            }
        });
        jrbPredetMeto.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                jrbPredetMetoPropertyChange(evt);
            }
        });

        txaMetodologia.setColumns(20);
        txaMetodologia.setLineWrap(true);
        txaMetodologia.setRows(5);
        jScrollPane3.setViewportView(txaMetodologia);

        javax.swing.GroupLayout jPanel25Layout = new javax.swing.GroupLayout(jPanel25);
        jPanel25.setLayout(jPanel25Layout);
        jPanel25Layout.setHorizontalGroup(
            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel25Layout.createSequentialGroup()
                .addComponent(jrbPredetMeto)
                .addGap(18, 18, 18)
                .addComponent(jrbAgregarMeto)
                .addGap(0, 244, Short.MAX_VALUE))
            .addComponent(jScrollPane3)
        );
        jPanel25Layout.setVerticalGroup(
            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel25Layout.createSequentialGroup()
                .addGroup(jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jrbPredetMeto)
                    .addComponent(jrbAgregarMeto))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 188, Short.MAX_VALUE)
                .addGap(0, 0, 0))
        );

        jTabbedPane2.addTab("Metodologíay reglamentación", jPanel25);

        jPanel14.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        txaObservaciones.setColumns(20);
        txaObservaciones.setLineWrap(true);
        txaObservaciones.setRows(5);
        jScrollPane11.setViewportView(txaObservaciones);

        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane11)
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane11, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE)
        );

        jTabbedPane2.addTab("Observación", jPanel14);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel3)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2)
                    .addComponent(jLabel4)
                    .addComponent(jLabel5)
                    .addComponent(jLabel12)
                    .addComponent(jLabel13)
                    .addComponent(jLabel14)
                    .addComponent(jLabel15)
                    .addComponent(jLabel19))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(jcbDistrito, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jcbProvincia, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jcbDepartamento, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jdcFecha, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 329, Short.MAX_VALUE)
                    .addComponent(txfRegistroPerito, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txfPerito, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txfSolicitante, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txfDireccion)
                    .addComponent(txfPropietario2, javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txfPropietario1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(0, 0, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addComponent(jTabbedPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 434, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txfPropietario1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txfPropietario2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel12))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txfSolicitante, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel13))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txfPerito, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel14))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txfRegistroPerito, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel15))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jdcFecha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel19))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jcbDepartamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(jcbProvincia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jcbDistrito, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txfDireccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jTabbedPane2))
        );

        jbAgregar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/Nuevo.png"))); // NOI18N
        jbAgregar.setText("AGREGAR");
        jbAgregar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jbAgregar.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jbAgregar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        jbSalir.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/exit_min.png"))); // NOI18N
        jbSalir.setText("SALIR");
        jbSalir.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jbSalir.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jbSalir.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jbSalir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbSalirActionPerformed(evt);
            }
        });

        jbEditar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/Modificar_Min.png"))); // NOI18N
        jbEditar.setText("EDITAR");
        jbEditar.setEnabled(false);
        jbEditar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jbEditar.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jbEditar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        jbGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/Guardar_Min.png"))); // NOI18N
        jbGuardar.setText("GUARDAR");
        jbGuardar.setEnabled(false);
        jbGuardar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jbGuardar.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jbGuardar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        jbGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbGuardarActionPerformed(evt);
            }
        });

        jbCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/Cancelar_Min.png"))); // NOI18N
        jbCancelar.setText("CANCELAR");
        jbCancelar.setEnabled(false);
        jbCancelar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        jbCancelar.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jbCancelar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Buscar propiedad", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        txfBuscar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txfBuscarActionPerformed(evt);
            }
        });

        jbBuscar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/small_buscar.png"))); // NOI18N
        jbBuscar.setToolTipText("Buscar");
        jbBuscar.setVerticalAlignment(javax.swing.SwingConstants.BOTTOM);
        jbBuscar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);

        jtPropiedad.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane1.setViewportView(jtPropiedad);

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addComponent(txfBuscar, javax.swing.GroupLayout.DEFAULT_SIZE, 369, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jbBuscar))
            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txfBuscar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbBuscar))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel23Layout = new javax.swing.GroupLayout(jPanel23);
        jPanel23.setLayout(jPanel23Layout);
        jPanel23Layout.setHorizontalGroup(
            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel23Layout.createSequentialGroup()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 444, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel23Layout.createSequentialGroup()
                        .addComponent(jbAgregar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbEditar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbGuardar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbCancelar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbSalir)
                        .addGap(0, 19, Short.MAX_VALUE)))
                .addGap(0, 0, 0))
        );
        jPanel23Layout.setVerticalGroup(
            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(jPanel23Layout.createSequentialGroup()
                .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jbAgregar)
                    .addComponent(jbEditar)
                    .addComponent(jbGuardar)
                    .addComponent(jbCancelar)
                    .addComponent(jbSalir))
                .addContainerGap())
        );

        jTabbedPane1.addTab("Datos básicos", jPanel23);

        jpLindero.setBorder(javax.swing.BorderFactory.createTitledBorder("Linderos"));

        jLabel20.setText("Frente :");

        jLabel21.setText("Fondo :");

        jLabel22.setText("Derecha :");

        jLabel23.setText("Izquierda :");

        txaLinderoFrente.setColumns(20);
        txaLinderoFrente.setLineWrap(true);
        txaLinderoFrente.setRows(5);
        jScrollPane26.setViewportView(txaLinderoFrente);

        txaLinderoDerecha.setColumns(20);
        txaLinderoDerecha.setLineWrap(true);
        txaLinderoDerecha.setRows(5);
        jScrollPane27.setViewportView(txaLinderoDerecha);

        txaLinderoIzquierda.setColumns(20);
        txaLinderoIzquierda.setLineWrap(true);
        txaLinderoIzquierda.setRows(5);
        jScrollPane28.setViewportView(txaLinderoIzquierda);

        txaLinderoFondo.setColumns(20);
        txaLinderoFondo.setLineWrap(true);
        txaLinderoFondo.setRows(5);
        jScrollPane29.setViewportView(txaLinderoFondo);

        javax.swing.GroupLayout jpLinderoLayout = new javax.swing.GroupLayout(jpLindero);
        jpLindero.setLayout(jpLinderoLayout);
        jpLinderoLayout.setHorizontalGroup(
            jpLinderoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpLinderoLayout.createSequentialGroup()
                .addGroup(jpLinderoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel23)
                    .addComponent(jLabel20)
                    .addComponent(jLabel22)
                    .addComponent(jLabel21))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jpLinderoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane26, javax.swing.GroupLayout.DEFAULT_SIZE, 368, Short.MAX_VALUE)
                    .addComponent(jScrollPane27)
                    .addComponent(jScrollPane28)
                    .addComponent(jScrollPane29)))
        );
        jpLinderoLayout.setVerticalGroup(
            jpLinderoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpLinderoLayout.createSequentialGroup()
                .addGroup(jpLinderoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel20)
                    .addComponent(jScrollPane26, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jpLinderoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane27, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel22))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jpLinderoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jpLinderoLayout.createSequentialGroup()
                        .addComponent(jScrollPane28)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jpLinderoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane29, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel21)))
                    .addGroup(jpLinderoLayout.createSequentialGroup()
                        .addComponent(jLabel23)
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addGap(5, 5, 5))
        );

        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder("Zonificación y uso actual del predio"));

        txaZonificacion.setColumns(20);
        txaZonificacion.setLineWrap(true);
        txaZonificacion.setRows(5);
        jScrollPane4.setViewportView(txaZonificacion);

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane4)
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 111, Short.MAX_VALUE)
        );

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Entorno"));

        jLabel25.setText("Vía de acceso :");

        jLabel26.setText("Densidad :");

        jLabel27.setText("Predios circundantes :");

        jLabel28.setText("Uso urbano :");

        txaViaAcceso.setColumns(20);
        txaViaAcceso.setLineWrap(true);
        txaViaAcceso.setRows(5);
        jScrollPane30.setViewportView(txaViaAcceso);

        txaPredioCircundante.setColumns(20);
        txaPredioCircundante.setLineWrap(true);
        txaPredioCircundante.setRows(5);
        jScrollPane31.setViewportView(txaPredioCircundante);

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel25)
                    .addComponent(jLabel26)
                    .addComponent(jLabel27)
                    .addComponent(jLabel28))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane30, javax.swing.GroupLayout.DEFAULT_SIZE, 309, Short.MAX_VALUE)
                    .addComponent(txfDensidad)
                    .addComponent(jScrollPane31)
                    .addComponent(txfUsoUrbano)))
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel25)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jScrollPane30, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txfDensidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel26))))
                .addGap(8, 8, 8)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(jScrollPane31, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txfUsoUrbano, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel28)))
                    .addComponent(jLabel27)))
        );

        jPanel3.setBorder(javax.swing.BorderFactory.createTitledBorder("Inscripción"));

        txaInscripcion.setColumns(20);
        txaInscripcion.setLineWrap(true);
        txaInscripcion.setRows(5);
        jScrollPane32.setViewportView(txaInscripcion);

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane32, javax.swing.GroupLayout.Alignment.TRAILING)
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane32, javax.swing.GroupLayout.DEFAULT_SIZE, 83, Short.MAX_VALUE)
        );

        javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
        jPanel18.setLayout(jPanel18Layout);
        jPanel18Layout.setHorizontalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addComponent(jpLindero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );
        jPanel18Layout.setVerticalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jpLindero, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, 278, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        jTabbedPane1.addTab("Linderos y entorno", jPanel18);

        jPanel22.setBorder(javax.swing.BorderFactory.createTitledBorder("Descripción"));

        txaDescripcion.setColumns(20);
        txaDescripcion.setLineWrap(true);
        txaDescripcion.setRows(5);
        jScrollPane6.setViewportView(txaDescripcion);

        javax.swing.GroupLayout jPanel22Layout = new javax.swing.GroupLayout(jPanel22);
        jPanel22.setLayout(jPanel22Layout);
        jPanel22Layout.setHorizontalGroup(
            jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 430, Short.MAX_VALUE)
        );
        jPanel22Layout.setVerticalGroup(
            jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE)
        );

        jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Distribución"));

        jScrollPane7.addInputMethodListener(new java.awt.event.InputMethodListener() {
            public void caretPositionChanged(java.awt.event.InputMethodEvent evt) {
            }
            public void inputMethodTextChanged(java.awt.event.InputMethodEvent evt) {
                jScrollPane7InputMethodTextChanged(evt);
            }
        });

        jtDistribucion.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jtDistribucion.setEditingColumn(1);
        jtDistribucion.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jtDistribucionMouseClicked(evt);
            }
        });
        jtDistribucion.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                jtDistribucionPropertyChange(evt);
            }
        });
        jScrollPane7.setViewportView(jtDistribucion);

        jbAgregarDistribucion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/small_agregar.png"))); // NOI18N
        jbAgregarDistribucion.setBorder(null);
        jbAgregarDistribucion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbAgregarDistribucionActionPerformed(evt);
            }
        });

        jbQuitarDistribucion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/small_cancelar.png"))); // NOI18N
        jbQuitarDistribucion.setBorder(null);
        jbQuitarDistribucion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbQuitarDistribucionActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jbAgregarDistribucion, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbQuitarDistribucion, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(0, 0, 0)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane7, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addComponent(jbAgregarDistribucion, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbQuitarDistribucion, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE))))
        );

        jPanel13.setBorder(javax.swing.BorderFactory.createTitledBorder("Especificación técnica"));

        jtEspecificacionTecnica.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane10.setViewportView(jtEspecificacionTecnica);

        jbQuitarEspecificaconTecnica.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/small_cancelar.png"))); // NOI18N
        jbQuitarEspecificaconTecnica.setBorder(null);
        jbQuitarEspecificaconTecnica.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbQuitarEspecificaconTecnicaActionPerformed(evt);
            }
        });

        jbEspecificacionTecnica.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/small_agregar.png"))); // NOI18N
        jbEspecificacionTecnica.setBorder(null);
        jbEspecificacionTecnica.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbEspecificacionTecnicaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addComponent(jScrollPane10, javax.swing.GroupLayout.DEFAULT_SIZE, 395, Short.MAX_VALUE)
                .addGap(0, 0, 0)
                .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jbEspecificacionTecnica, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbQuitarEspecificaconTecnica, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 34, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane10, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addComponent(jbEspecificacionTecnica, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jbQuitarEspecificaconTecnica, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 192, Short.MAX_VALUE))
        );

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder("Infraestructura de bienes y servicios"));

        jtInfraestructura.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane5.setViewportView(jtInfraestructura);

        jbAgregarInfraestructura.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/small_agregar.png"))); // NOI18N
        jbAgregarInfraestructura.setBorder(null);
        jbAgregarInfraestructura.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbAgregarInfraestructuraActionPerformed(evt);
            }
        });

        jbQuitarInfraestructura.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/small_cancelar.png"))); // NOI18N
        jbQuitarInfraestructura.setBorder(null);
        jbQuitarInfraestructura.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbQuitarInfraestructuraActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addGap(0, 0, 0)
                .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jbAgregarInfraestructura, javax.swing.GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE)
                    .addComponent(jbQuitarInfraestructura, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jScrollPane5, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addComponent(jbAgregarInfraestructura, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jbQuitarInfraestructura, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);
        jPanel19.setLayout(jPanel19Layout);
        jPanel19Layout.setHorizontalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel22, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );
        jPanel19Layout.setVerticalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel22, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel5, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        jTabbedPane1.addTab("Descripción y distribución", jPanel19);

        jPanel8.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "VALUACION DE PROPIEDAD", javax.swing.border.TitledBorder.CENTER, javax.swing.border.TitledBorder.DEFAULT_POSITION));

        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder("Valuación de terreno"));

        jbCalcularTerreno.setText("Calcular");
        jbCalcularTerreno.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbCalcularTerrenoActionPerformed(evt);
            }
        });

        jLabel6.setText("Total :");

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addComponent(jLabel6)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(txfTerreno)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jbCalcularTerreno))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jLabel6)
                .addComponent(txfTerreno, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addComponent(jbCalcularTerreno))
        );

        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder("Valuación complementaria"));

        jtComplementario.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane8.setViewportView(jtComplementario);

        jbaAgregarComplementario.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/small_agregar.png"))); // NOI18N
        jbaAgregarComplementario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbaAgregarComplementarioActionPerformed(evt);
            }
        });

        jLabel7.setText("Total :");

        jbCalcularComplementario.setText("Calcular");
        jbCalcularComplementario.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbCalcularComplementarioActionPerformed(evt);
            }
        });

        jbQuitarValuacionComplementaria.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/small_cancelar.png"))); // NOI18N
        jbQuitarValuacionComplementaria.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbQuitarValuacionComplementariaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txfComplementario)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbCalcularComplementario))
                    .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 378, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jbQuitarValuacionComplementaria, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbaAgregarComplementario, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(0, 8, Short.MAX_VALUE))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel10Layout.createSequentialGroup()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addComponent(jbaAgregarComplementario)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbQuitarValuacionComplementaria)
                        .addGap(0, 112, Short.MAX_VALUE))
                    .addComponent(jScrollPane8, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel7)
                    .addComponent(txfComplementario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbCalcularComplementario)))
        );

        jPanel12.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos generales"));

        jLabel10.setFont(new java.awt.Font("Dialog", 1, 11)); // NOI18N
        jLabel10.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel10.setText("VALOR TOTAL DEL PREDIO (S/.) ");
        jLabel10.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

        txfPerimetro.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txfPerimetroActionPerformed(evt);
            }
        });

        jcbEstado.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "<Seleccionar>", "Muy bueno", "Bueno", "Regular", "Malo" }));

        jLabel9.setText("Perímetro (m) :");

        jLabel11.setText("Estado general :");

        jbCalcularPredio.setText("Calcular");
        jbCalcularPredio.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbCalcularPredioActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel12Layout.createSequentialGroup()
                        .addComponent(jLabel9)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
                    .addGroup(jPanel12Layout.createSequentialGroup()
                        .addGap(13, 13, 13)
                        .addComponent(jLabel11)
                        .addGap(13, 13, 13)))
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txfPerimetro)
                    .addComponent(jcbEstado, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
            .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addComponent(txfValorTotalPredio, javax.swing.GroupLayout.PREFERRED_SIZE, 346, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jbCalcularPredio)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel12Layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel9)
                    .addComponent(txfPerimetro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel12Layout.createSequentialGroup()
                        .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jcbEstado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel11))
                        .addGap(6, 6, 6)
                        .addComponent(jLabel10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txfValorTotalPredio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jbCalcularPredio)))
        );

        jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder("Valuación de edificación"));

        jbAgregarEdificacion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/small_agregar.png"))); // NOI18N
        jbAgregarEdificacion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbAgregarEdificacionActionPerformed(evt);
            }
        });

        jtEdificacion.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jScrollPane9.setViewportView(jtEdificacion);

        jLabel8.setText("Total :");

        jbCalcularEdificacion.setText("Calcular");
        jbCalcularEdificacion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbCalcularEdificacionActionPerformed(evt);
            }
        });

        jbQuitarValuacionEdificacion.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/small_cancelar.png"))); // NOI18N
        jbQuitarValuacionEdificacion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbQuitarValuacionEdificacionActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel11Layout.createSequentialGroup()
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(txfEdificacion)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbCalcularEdificacion))
                    .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jbAgregarEdificacion, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbQuitarValuacionEdificacion, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addComponent(jScrollPane9, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel8)
                            .addComponent(jbCalcularEdificacion)
                            .addComponent(txfEdificacion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel11Layout.createSequentialGroup()
                        .addComponent(jbAgregarEdificacion)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jbQuitarValuacionEdificacion)
                        .addGap(0, 146, Short.MAX_VALUE)))
                .addGap(0, 0, 0))
        );

        jPanel16.setBorder(javax.swing.BorderFactory.createTitledBorder("Tasación"));

        bgTasacion.add(jrbPredetTasacion);
        jrbPredetTasacion.setText("Predeterminado");
        jrbPredetTasacion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jrbPredetTasacionActionPerformed(evt);
            }
        });
        jrbPredetTasacion.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                jrbPredetTasacionPropertyChange(evt);
            }
        });

        bgTasacion.add(jrbAgregarTasacion);
        jrbAgregarTasacion.setText("Agregar");
        jrbAgregarTasacion.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jrbAgregarTasacionActionPerformed(evt);
            }
        });
        jrbAgregarTasacion.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                jrbAgregarTasacionPropertyChange(evt);
            }
        });

        txaTasacion.setColumns(20);
        txaTasacion.setLineWrap(true);
        txaTasacion.setRows(5);
        txaTasacion.setMaximumSize(new java.awt.Dimension(281, 281));
        jScrollPane12.setViewportView(txaTasacion);

        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
        jPanel16.setLayout(jPanel16Layout);
        jPanel16Layout.setHorizontalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addComponent(jrbPredetTasacion)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jrbAgregarTasacion)
                .addGap(0, 0, Short.MAX_VALUE))
            .addComponent(jScrollPane12, javax.swing.GroupLayout.Alignment.TRAILING)
        );
        jPanel16Layout.setVerticalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jrbPredetTasacion)
                    .addComponent(jrbAgregarTasacion))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane12))
        );

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel9, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel11, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel10, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(0, 0, 0))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addComponent(jPanel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
        jPanel20.setLayout(jPanel20Layout);
        jPanel20Layout.setHorizontalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        jPanel20Layout.setVerticalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        jTabbedPane1.addTab("Valuación de Propiedad", jPanel20);

        jPanel15.setBorder(javax.swing.BorderFactory.createTitledBorder("Panel fotográfico"));

        lblFoto1.setBackground(new java.awt.Color(0, 0, 0));
        lblFoto1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblFoto1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png"))); // NOI18N
        lblFoto1.setAutoscrolls(true);
        lblFoto1.setOpaque(true);

        jbCargarFoto1.setText("...");
        jbCargarFoto1.setEnabled(false);
        jbCargarFoto1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbCargarFoto1ActionPerformed(evt);
            }
        });

        jtxaImagen1.setColumns(20);
        jtxaImagen1.setLineWrap(true);
        jtxaImagen1.setRows(5);
        jScrollPane14.setViewportView(jtxaImagen1);

        javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);
        jPanel17.setLayout(jPanel17Layout);
        jPanel17Layout.setHorizontalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel17Layout.createSequentialGroup()
                .addComponent(lblFoto1, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbCargarFoto1, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
        jPanel17Layout.setVerticalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel17Layout.createSequentialGroup()
                .addGap(0, 0, 0)
                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(lblFoto1, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel17Layout.createSequentialGroup()
                        .addComponent(jbCargarFoto1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane14, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(0, 0, Short.MAX_VALUE))
        );

        lblFoto4.setBackground(new java.awt.Color(0, 0, 0));
        lblFoto4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblFoto4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png"))); // NOI18N
        lblFoto4.setAutoscrolls(true);
        lblFoto4.setOpaque(true);

        jbCargarFoto4.setText("...");
        jbCargarFoto4.setEnabled(false);
        jbCargarFoto4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbCargarFoto4ActionPerformed(evt);
            }
        });

        jtxaImagen4.setColumns(20);
        jtxaImagen4.setLineWrap(true);
        jtxaImagen4.setRows(5);
        jScrollPane17.setViewportView(jtxaImagen4);

        javax.swing.GroupLayout jPanel26Layout = new javax.swing.GroupLayout(jPanel26);
        jPanel26.setLayout(jPanel26Layout);
        jPanel26Layout.setHorizontalGroup(
            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel26Layout.createSequentialGroup()
                .addComponent(lblFoto4, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jbCargarFoto4, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jScrollPane17, javax.swing.GroupLayout.PREFERRED_SIZE, 163, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
        jPanel26Layout.setVerticalGroup(
            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel26Layout.createSequentialGroup()
                .addGap(0, 0, 0)
                .addGroup(jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(lblFoto4, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel26Layout.createSequentialGroup()
                        .addComponent(jbCargarFoto4)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jScrollPane17, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(0, 0, Short.MAX_VALUE))
        );

        jtxaImagen7.setColumns(20);
        jtxaImagen7.setLineWrap(true);
        jtxaImagen7.setRows(5);
        jScrollPane20.setViewportView(jtxaImagen7);

        lblFoto10.setBackground(new java.awt.Color(0, 0, 0));
        lblFoto10.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblFoto10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png"))); // NOI18N
        lblFoto10.setAutoscrolls(true);
        lblFoto10.setOpaque(true);

        jbCargarFoto10.setText("...");
        jbCargarFoto10.setEnabled(false);
        jbCargarFoto10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbCargarFoto10ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel27Layout = new javax.swing.GroupLayout(jPanel27);
        jPanel27.setLayout(jPanel27Layout);
        jPanel27Layout.setHorizontalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel27Layout.createSequentialGroup()
                .addGap(0, 0, 0)
                .addComponent(lblFoto10, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane20)
                    .addGroup(jPanel27Layout.createSequentialGroup()
                        .addComponent(jbCargarFoto10)
                        .addGap(0, 0, Short.MAX_VALUE))))
        );
        jPanel27Layout.setVerticalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel27Layout.createSequentialGroup()
                .addGap(0, 0, 0)
                .addGroup(jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(lblFoto10, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel27Layout.createSequentialGroup()
                        .addComponent(jbCargarFoto10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jScrollPane20, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(0, 0, 0))
        );

        jtxaImagen10.setColumns(20);
        jtxaImagen10.setLineWrap(true);
        jtxaImagen10.setRows(5);
        jScrollPane23.setViewportView(jtxaImagen10);

        lblFoto7.setBackground(new java.awt.Color(0, 0, 0));
        lblFoto7.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblFoto7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png"))); // NOI18N
        lblFoto7.setAutoscrolls(true);
        lblFoto7.setOpaque(true);

        jbCargarFoto7.setText("...");
        jbCargarFoto7.setEnabled(false);
        jbCargarFoto7.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbCargarFoto7ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel28Layout = new javax.swing.GroupLayout(jPanel28);
        jPanel28.setLayout(jPanel28Layout);
        jPanel28Layout.setHorizontalGroup(
            jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel28Layout.createSequentialGroup()
                .addGap(0, 0, 0)
                .addComponent(lblFoto7, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane23, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addGroup(jPanel28Layout.createSequentialGroup()
                        .addComponent(jbCargarFoto7)
                        .addContainerGap())))
        );
        jPanel28Layout.setVerticalGroup(
            jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel28Layout.createSequentialGroup()
                .addGroup(jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(jPanel28Layout.createSequentialGroup()
                        .addComponent(jbCargarFoto7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jScrollPane23, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(lblFoto7, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(0, 0, Short.MAX_VALUE))
        );

        jtxaImagen2.setColumns(20);
        jtxaImagen2.setLineWrap(true);
        jtxaImagen2.setRows(5);
        jScrollPane15.setViewportView(jtxaImagen2);

        lblFoto2.setBackground(new java.awt.Color(0, 0, 0));
        lblFoto2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblFoto2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png"))); // NOI18N
        lblFoto2.setAutoscrolls(true);
        lblFoto2.setOpaque(true);

        jbCargarFoto2.setText("...");
        jbCargarFoto2.setEnabled(false);
        jbCargarFoto2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbCargarFoto2ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel29Layout = new javax.swing.GroupLayout(jPanel29);
        jPanel29.setLayout(jPanel29Layout);
        jPanel29Layout.setHorizontalGroup(
            jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel29Layout.createSequentialGroup()
                .addComponent(lblFoto2, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel29Layout.createSequentialGroup()
                        .addComponent(jbCargarFoto2, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addComponent(jScrollPane15))
                .addGap(0, 0, 0))
        );
        jPanel29Layout.setVerticalGroup(
            jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel29Layout.createSequentialGroup()
                .addGroup(jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(lblFoto2, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel29Layout.createSequentialGroup()
                        .addComponent(jbCargarFoto2)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jScrollPane15, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        lblFoto5.setBackground(new java.awt.Color(0, 0, 0));
        lblFoto5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblFoto5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png"))); // NOI18N
        lblFoto5.setAutoscrolls(true);
        lblFoto5.setOpaque(true);

        jtxaImagen5.setColumns(20);
        jtxaImagen5.setLineWrap(true);
        jtxaImagen5.setRows(5);
        jScrollPane18.setViewportView(jtxaImagen5);

        jbCargarFoto5.setText("...");
        jbCargarFoto5.setEnabled(false);
        jbCargarFoto5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbCargarFoto5ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel30Layout = new javax.swing.GroupLayout(jPanel30);
        jPanel30.setLayout(jPanel30Layout);
        jPanel30Layout.setHorizontalGroup(
            jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel30Layout.createSequentialGroup()
                .addGap(0, 0, 0)
                .addComponent(lblFoto5, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbCargarFoto5))
                .addGap(0, 0, 0))
        );
        jPanel30Layout.setVerticalGroup(
            jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel30Layout.createSequentialGroup()
                .addGap(0, 0, 0)
                .addGroup(jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel30Layout.createSequentialGroup()
                        .addComponent(jbCargarFoto5)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jScrollPane18, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(lblFoto5, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(0, 0, 0))
        );

        jbCargarFoto3.setText("...");
        jbCargarFoto3.setEnabled(false);
        jbCargarFoto3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbCargarFoto3ActionPerformed(evt);
            }
        });

        jtxaImagen3.setColumns(20);
        jtxaImagen3.setLineWrap(true);
        jtxaImagen3.setRows(5);
        jScrollPane16.setViewportView(jtxaImagen3);

        lblFoto3.setBackground(new java.awt.Color(0, 0, 0));
        lblFoto3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblFoto3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png"))); // NOI18N
        lblFoto3.setAutoscrolls(true);
        lblFoto3.setOpaque(true);

        javax.swing.GroupLayout jPanel31Layout = new javax.swing.GroupLayout(jPanel31);
        jPanel31.setLayout(jPanel31Layout);
        jPanel31Layout.setHorizontalGroup(
            jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel31Layout.createSequentialGroup()
                .addComponent(lblFoto3, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jbCargarFoto3)
                    .addComponent(jScrollPane16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
        jPanel31Layout.setVerticalGroup(
            jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel31Layout.createSequentialGroup()
                .addGroup(jPanel31Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(lblFoto3, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel31Layout.createSequentialGroup()
                        .addComponent(jbCargarFoto3)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jScrollPane16, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(0, 0, 0))
        );

        lblFoto8.setBackground(new java.awt.Color(0, 0, 0));
        lblFoto8.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblFoto8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png"))); // NOI18N
        lblFoto8.setAutoscrolls(true);
        lblFoto8.setOpaque(true);

        jbCargarFoto8.setText("...");
        jbCargarFoto8.setEnabled(false);
        jbCargarFoto8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbCargarFoto8ActionPerformed(evt);
            }
        });

        jtxaImagen8.setColumns(20);
        jtxaImagen8.setLineWrap(true);
        jtxaImagen8.setRows(5);
        jScrollPane21.setViewportView(jtxaImagen8);

        javax.swing.GroupLayout jPanel32Layout = new javax.swing.GroupLayout(jPanel32);
        jPanel32.setLayout(jPanel32Layout);
        jPanel32Layout.setHorizontalGroup(
            jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel32Layout.createSequentialGroup()
                .addComponent(lblFoto8, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel32Layout.createSequentialGroup()
                        .addComponent(jbCargarFoto8, javax.swing.GroupLayout.PREFERRED_SIZE, 43, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(86, 86, 86))
                    .addComponent(jScrollPane21, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)))
        );
        jPanel32Layout.setVerticalGroup(
            jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel32Layout.createSequentialGroup()
                .addGap(0, 0, 0)
                .addGroup(jPanel32Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(lblFoto8, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel32Layout.createSequentialGroup()
                        .addComponent(jbCargarFoto8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jScrollPane21, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(0, 0, 0))
        );

        jtxaImagen11.setColumns(20);
        jtxaImagen11.setLineWrap(true);
        jtxaImagen11.setRows(5);
        jScrollPane24.setViewportView(jtxaImagen11);

        lblFoto11.setBackground(new java.awt.Color(0, 0, 0));
        lblFoto11.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblFoto11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png"))); // NOI18N
        lblFoto11.setAutoscrolls(true);
        lblFoto11.setOpaque(true);

        jbCargarFoto11.setText("...");
        jbCargarFoto11.setEnabled(false);
        jbCargarFoto11.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbCargarFoto11ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel33Layout = new javax.swing.GroupLayout(jPanel33);
        jPanel33.setLayout(jPanel33Layout);
        jPanel33Layout.setHorizontalGroup(
            jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel33Layout.createSequentialGroup()
                .addGap(0, 0, 0)
                .addComponent(lblFoto11, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel33Layout.createSequentialGroup()
                        .addComponent(jbCargarFoto11)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addComponent(jScrollPane24, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)))
        );
        jPanel33Layout.setVerticalGroup(
            jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel33Layout.createSequentialGroup()
                .addGap(0, 0, 0)
                .addGroup(jPanel33Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel33Layout.createSequentialGroup()
                        .addComponent(jbCargarFoto11)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jScrollPane24, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(lblFoto11, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );

        jtxaImagen6.setColumns(20);
        jtxaImagen6.setLineWrap(true);
        jtxaImagen6.setRows(5);
        jScrollPane19.setViewportView(jtxaImagen6);

        lblFoto6.setBackground(new java.awt.Color(0, 0, 0));
        lblFoto6.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblFoto6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png"))); // NOI18N
        lblFoto6.setAutoscrolls(true);
        lblFoto6.setOpaque(true);

        jbCargarFoto6.setText("...");
        jbCargarFoto6.setEnabled(false);
        jbCargarFoto6.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbCargarFoto6ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel34Layout = new javax.swing.GroupLayout(jPanel34);
        jPanel34.setLayout(jPanel34Layout);
        jPanel34Layout.setHorizontalGroup(
            jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel34Layout.createSequentialGroup()
                .addComponent(lblFoto6, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jbCargarFoto6)
                    .addComponent(jScrollPane19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
        jPanel34Layout.setVerticalGroup(
            jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel34Layout.createSequentialGroup()
                .addGap(0, 0, 0)
                .addGroup(jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel34Layout.createSequentialGroup()
                        .addComponent(jbCargarFoto6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jScrollPane19, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(lblFoto6, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(0, 0, 0))
        );

        jtxaImagen9.setColumns(20);
        jtxaImagen9.setLineWrap(true);
        jtxaImagen9.setRows(5);
        jScrollPane22.setViewportView(jtxaImagen9);

        jbCargarFoto9.setText("...");
        jbCargarFoto9.setEnabled(false);
        jbCargarFoto9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbCargarFoto9ActionPerformed(evt);
            }
        });

        lblFoto9.setBackground(new java.awt.Color(0, 0, 0));
        lblFoto9.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblFoto9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png"))); // NOI18N
        lblFoto9.setAutoscrolls(true);
        lblFoto9.setOpaque(true);

        javax.swing.GroupLayout jPanel35Layout = new javax.swing.GroupLayout(jPanel35);
        jPanel35.setLayout(jPanel35Layout);
        jPanel35Layout.setHorizontalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel35Layout.createSequentialGroup()
                .addComponent(lblFoto9, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jbCargarFoto9)
                    .addComponent(jScrollPane22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel35Layout.setVerticalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel35Layout.createSequentialGroup()
                .addGap(0, 0, 0)
                .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(lblFoto9, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel35Layout.createSequentialGroup()
                        .addComponent(jbCargarFoto9)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jScrollPane22, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(0, 0, 0))
        );

        jbCargarFoto12.setText("...");
        jbCargarFoto12.setEnabled(false);
        jbCargarFoto12.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbCargarFoto12ActionPerformed(evt);
            }
        });

        jtxaImagen12.setColumns(20);
        jtxaImagen12.setLineWrap(true);
        jtxaImagen12.setRows(5);
        jScrollPane25.setViewportView(jtxaImagen12);

        lblFoto12.setBackground(new java.awt.Color(0, 0, 0));
        lblFoto12.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblFoto12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png"))); // NOI18N
        lblFoto12.setAutoscrolls(true);
        lblFoto12.setOpaque(true);

        javax.swing.GroupLayout jPanel36Layout = new javax.swing.GroupLayout(jPanel36);
        jPanel36.setLayout(jPanel36Layout);
        jPanel36Layout.setHorizontalGroup(
            jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel36Layout.createSequentialGroup()
                .addComponent(lblFoto12, javax.swing.GroupLayout.PREFERRED_SIZE, 114, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jbCargarFoto12)
                    .addComponent(jScrollPane25, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
        );
        jPanel36Layout.setVerticalGroup(
            jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel36Layout.createSequentialGroup()
                .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel36Layout.createSequentialGroup()
                        .addComponent(jbCargarFoto12)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jScrollPane25, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(lblFoto12, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(0, 0, 0))
        );

        javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
        jPanel15.setLayout(jPanel15Layout);
        jPanel15Layout.setHorizontalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel27, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel28, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel26, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel15Layout.createSequentialGroup()
                        .addGap(5, 5, 5)
                        .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jPanel29, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel30, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addGroup(jPanel15Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel33, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel32, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel15Layout.createSequentialGroup()
                        .addGap(5, 5, 5)
                        .addComponent(jPanel31, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel15Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel34, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel15Layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel35, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPanel36, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addGap(150, 150, 150))
        );
        jPanel15Layout.setVerticalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel15Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel15Layout.createSequentialGroup()
                        .addComponent(jPanel29, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel30, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel32, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel15Layout.createSequentialGroup()
                        .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel15Layout.createSequentialGroup()
                                .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jPanel26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jPanel27, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel15Layout.createSequentialGroup()
                                .addComponent(jPanel31, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jPanel34, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jPanel35, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel36, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel33, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel28, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18))
        );

        javax.swing.GroupLayout jPanel21Layout = new javax.swing.GroupLayout(jPanel21);
        jPanel21.setLayout(jPanel21Layout);
        jPanel21Layout.setHorizontalGroup(
            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel21Layout.createSequentialGroup()
                .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, 902, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        jPanel21Layout.setVerticalGroup(
            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel21Layout.createSequentialGroup()
                .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Panel Fotográfico", jPanel21);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 890, javax.swing.GroupLayout.PREFERRED_SIZE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(0, 0, Short.MAX_VALUE)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 555, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void txfBuscarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txfBuscarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txfBuscarActionPerformed

    private void jbSalirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbSalirActionPerformed
        // TODO add your handling code here:
        dispose();
    }//GEN-LAST:event_jbSalirActionPerformed

    private void jrbPredetMetoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbPredetMetoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jrbPredetMetoActionPerformed

    private void jbQuitarDistribucionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbQuitarDistribucionActionPerformed
        // TODO add your handling code here:
        try {
            if (jtDistribucion.getSelectedRow() >= 0) {
                modeloDistribucionAsignado.remove(jtDistribucion.getSelectedRow());
            } else {
                JOptionPane.showMessageDialog(this, "Selecciona el elemento a eliminar.", "Atención.", JOptionPane.INFORMATION_MESSAGE);
                System.out.println("Seleccionar el elemento a eliminar");
            }
        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, "Error al eliminar la distribucion." + e, "Atención.", JOptionPane.INFORMATION_MESSAGE);

            Logger.getLogger(JIFAsignarDistribucion.class.getName()).log(Level.SEVERE, null, e);
        }

    }//GEN-LAST:event_jbQuitarDistribucionActionPerformed

    private void jbAgregarDistribucionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbAgregarDistribucionActionPerformed
        // TODO add your handling code here:
        parent.insertarInternalFrame(parent.jifAsignarDistribucion);

    }//GEN-LAST:event_jbAgregarDistribucionActionPerformed

    private void jbAgregarInfraestructuraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbAgregarInfraestructuraActionPerformed
        // TODO add your handling code here:
        parent.insertarInternalFrame(parent.jifAsignarInfraestructura);
    }//GEN-LAST:event_jbAgregarInfraestructuraActionPerformed

    private void jbQuitarInfraestructuraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbQuitarInfraestructuraActionPerformed
        // TODO add your handling code here:
        try {
            if (jtInfraestructura.getSelectedRow() >= 0) {
                modeloInfraestructuraAsignado.remove(jtInfraestructura.getSelectedRow());
            } else {
                JOptionPane.showMessageDialog(this, "Selecciona el elemento a eliminar.", "Atención.", JOptionPane.INFORMATION_MESSAGE);
                System.out.println("Seleccionar el elemento a eliminar");
            }
        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, "Error al eliminar la infraestructura. " + e, "Atención.", JOptionPane.INFORMATION_MESSAGE);

            Logger.getLogger(JIFAsignarInfraestructura.class.getName()).log(Level.SEVERE, null, e);
        }
    }//GEN-LAST:event_jbQuitarInfraestructuraActionPerformed

    private void jrbPredetObjPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jrbPredetObjPropertyChange
        // TODO add your handling code here:
        if (jrbPredetObj.isSelected()) {
            txaObjetivo.setText("Determinar el valor del mercado del predio");
            txaObjetivo.setEnabled(false);

        } else {
            txaObjetivo.setText("Determinar el valor del mercado del predio");
            txaObjetivo.setEnabled(true);
        }
    }//GEN-LAST:event_jrbPredetObjPropertyChange

    private void jrbPredetMetoPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jrbPredetMetoPropertyChange
        // TODO add your handling code here:
        if (jrbPredetMeto.isSelected()) {
            txaMetodologia.setText("La valoración se formula por el método de la tasación directa, teniendo en cuenta los valores comerciales del terreno y la construcción,como marco referencial los artículados que se indicarán en le proceso de la tasación del Reglamento Nacional de Tasaciones del Perú aprobado por Resolución Ministerial Nº - 469 - 99 - MTC - 9311.");
            txaMetodologia.setEnabled(false);
        } else {
            txaMetodologia.setText("La valoración se formula por el método de la tasación directa, teniendo en cuenta los valores comerciales del terreno y la construcción,como marco referencial los artículados que se indicarán en le proceso de la tasación del Reglamento Nacional de Tasaciones del Perú aprobado por Resolución Ministerial Nº - 469 - 99 - MTC - 9311.");
            txaMetodologia.setEnabled(true);
        }
    }//GEN-LAST:event_jrbPredetMetoPropertyChange

    private void jrbAgregarObjPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jrbAgregarObjPropertyChange
        // TODO add your handling code here:
        if (jrbAgregarObj.isSelected()) {
            txaObjetivo.setEnabled(true);
        } else {
            txaObjetivo.setEnabled(false);
        }
    }//GEN-LAST:event_jrbAgregarObjPropertyChange

    private void jrbAgregarMetoPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jrbAgregarMetoPropertyChange
        // TODO add your handling code here:
        if (jrbAgregarMeto.isSelected()) {
            txaMetodologia.setEnabled(true);
        } else {
            txaMetodologia.setEnabled(false);
        }
    }//GEN-LAST:event_jrbAgregarMetoPropertyChange

    private void jbGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbGuardarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jbGuardarActionPerformed

    private void jbCalcularTerrenoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbCalcularTerrenoActionPerformed
        // TODO add your handling code here:
        parent.insertarInternalFrame(jifValuacionTerreno);
        txfValorTotalPredio.setText("");
    }//GEN-LAST:event_jbCalcularTerrenoActionPerformed

    private void jbaAgregarComplementarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbaAgregarComplementarioActionPerformed
        // TODO add your handling code here:
        parent.insertarInternalFrame(jifValuacionComplementaria);
        txfComplementario.setText("");
        txfValorTotalPredio.setText("");
    }//GEN-LAST:event_jbaAgregarComplementarioActionPerformed

    private void jbCalcularComplementarioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbCalcularComplementarioActionPerformed
        // TODO add your handling code here:
        try {
            double sc = 0.0;
            if (jtComplementario.getRowCount() > 0) {
                for (int i = 0; i < jtComplementario.getRowCount(); i++) {
                    sc = redondear(sc + modeloValuacionComplementario.get(i).getValorTotal());
                }
                txfComplementario.setText(Double.toString(redondear(sc)));
            } else {
                JOptionPane.showMessageDialog(this, "Agregar un valor complementario.", "Valorizacion complementaria", JOptionPane.INFORMATION_MESSAGE);

            }
        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, "Error al calcular el valor complemenrario.", "Valorizacion complementaria", JOptionPane.INFORMATION_MESSAGE);
        }
    }//GEN-LAST:event_jbCalcularComplementarioActionPerformed

    private void jbAgregarEdificacionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbAgregarEdificacionActionPerformed
        // TODO add your handling code here:
        parent.insertarInternalFrame(jifValuacionEdificacion);
        txfEdificacion.setText("");
        txfValorTotalPredio.setText("");
    }//GEN-LAST:event_jbAgregarEdificacionActionPerformed

    private void jbCalcularEdificacionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbCalcularEdificacionActionPerformed
        // TODO add your handling code here:
        double se = 0;
        try {
            if (jtEdificacion.getRowCount() > 0) {
                for (int i = 0; i < jtEdificacion.getRowCount(); i++) {
                    se = redondear(se + modeloValuacionEdificacion.get(i).getValortotal());
                }
                txfEdificacion.setText(Double.toString(redondear(se)));
            } else {
                JOptionPane.showMessageDialog(this, "Agregar el calculo de edificación.", "Valorizacion de edificación", JOptionPane.INFORMATION_MESSAGE);

            }

        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, "Error al calcular el valor de edificación.", "Valorizacion de edificación", JOptionPane.INFORMATION_MESSAGE);
        }
    }//GEN-LAST:event_jbCalcularEdificacionActionPerformed

    private void jbCalcularPredioActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbCalcularPredioActionPerformed
        // TODO add your handling code here:

        try {
            double tp = 0.0;

            if (!txfTerreno.getText().isEmpty() && !txfComplementario.getText().isEmpty()
                    && !txfEdificacion.getText().isEmpty()) {
                double t = Double.parseDouble(txfTerreno.getText());
                double c = Double.parseDouble(txfComplementario.getText());
                double e = Double.parseDouble(txfEdificacion.getText());

                tp = redondear(t + c + e);

                txfValorTotalPredio.setText(Double.toString(redondear(tp)));
            }

        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, "Error al calcular el valor del predio.", "Valorizacion del predio", JOptionPane.INFORMATION_MESSAGE);
        }

    }//GEN-LAST:event_jbCalcularPredioActionPerformed

    private void jbEspecificacionTecnicaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbEspecificacionTecnicaActionPerformed
        // TODO add your handling code here:
        parent.insertarInternalFrame(parent.jifAsignarEspecificaciónTecnica);
    }//GEN-LAST:event_jbEspecificacionTecnicaActionPerformed

    private void jbQuitarEspecificaconTecnicaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbQuitarEspecificaconTecnicaActionPerformed
        // TODO add your handling code here:
        try {
            if (jtEspecificacionTecnica.getSelectedRow() >= 0) {
                modeloEspecificacionTecnicaAsignada.remove(jtEspecificacionTecnica.getSelectedRow());
            } else {
                JOptionPane.showMessageDialog(this, "Selecciona el elemento a eliminar.", "Atención.", JOptionPane.INFORMATION_MESSAGE);

                System.out.println("Seleccionar el elemento a eliminar");

            }
        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, "Error al eliminar la especificación técnica. " + e, "Atención.", JOptionPane.INFORMATION_MESSAGE);

            Logger.getLogger(JIFAsignarDistribucion.class.getName()).log(Level.SEVERE, null, e);
        }
    }//GEN-LAST:event_jbQuitarEspecificaconTecnicaActionPerformed

    private void jbQuitarValuacionComplementariaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbQuitarValuacionComplementariaActionPerformed
        // TODO add your handling code here:
        txfComplementario.setText("");
        txfValorTotalPredio.setText("");
        try {
            if (jtComplementario.getSelectedRow() >= 0) {
                modeloValuacionComplementario.remove(jtComplementario.getSelectedRow());
            } else {
                JOptionPane.showMessageDialog(this, "Selecciona el elemento a eliminar.", "Atención.", JOptionPane.INFORMATION_MESSAGE);
                System.out.println("Seleccionar el elemento a eliminar");

            }
        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, "Error al eliminar la valuacion complementaria. " + e, "Atención.", JOptionPane.INFORMATION_MESSAGE);

            Logger.getLogger(JIFAsignarInfraestructura.class
                    .getName()).log(Level.SEVERE, null, e);
        }
    }//GEN-LAST:event_jbQuitarValuacionComplementariaActionPerformed

    private void jbQuitarValuacionEdificacionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbQuitarValuacionEdificacionActionPerformed
        // TODO add your handling code here:
        txfEdificacion.setText("");
        txfValorTotalPredio.setText("");

        try {
            if (jtEdificacion.getSelectedRow() >= 0) {
                modeloValuacionEdificacion.remove(jtEdificacion.getSelectedRow());
            } else {
                JOptionPane.showMessageDialog(this, "Selecciona el elemento a eliminar.", "Atención.", JOptionPane.INFORMATION_MESSAGE);
                System.out.println("Seleccionar el elemento a eliminar");

            }
        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, "Error al eliminar la valuación edificación. " + e, "Atención.", JOptionPane.INFORMATION_MESSAGE);

            Logger.getLogger(JIFAsignarInfraestructura.class
                    .getName()).log(Level.SEVERE, null, e);
        }
    }//GEN-LAST:event_jbQuitarValuacionEdificacionActionPerformed

    private void jrbPredetObjActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbPredetObjActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jrbPredetObjActionPerformed

    private void jbCargarFoto5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbCargarFoto5ActionPerformed
        seleccionarArchivo(ARCH_FOTOGRAFIA5);
    }//GEN-LAST:event_jbCargarFoto5ActionPerformed

    private void jrbPredetTasacionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbPredetTasacionActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jrbPredetTasacionActionPerformed

    private void jrbAgregarTasacionActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jrbAgregarTasacionActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jrbAgregarTasacionActionPerformed

    private void jrbPredetTasacionPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jrbPredetTasacionPropertyChange
        // TODO add your handling code here:
        if (jrbPredetTasacion.isSelected()) {
            txaTasacion.setText("Para la determinación del valor comercialdel terreno se han conjugado los siguientes factores: "
                    + "\n" + "- Investigación del mercado inmobiliario, ofertas y transferencias realizadas en la zona."
                    + "\n" + "- Entorno descrito anteriormente."
                    + "\n" + "- Ubicación en una arteria principal del distrito."
                    + "\n" + "- Otros valores tangibles e intangibles."
                    + "\n" + "* Agregar el método de obteción del valor unitario del terreno.");
            txaTasacion.setEnabled(false);
        } else {
            txaTasacion.setText("Para la determinación del valor comercialdel terreno se han conjugado los siguientes factores: "
                    + "\n" + "- Investigación del mercado inmobiliario, ofertas y transferencias realizadas en la zona."
                    + "\n" + "- Entorno descrito anteriormente."
                    + "\n" + "- Ubicación en una arteria principal del distrito."
                    + "\n" + "- Otros valores tangibles e intangibles."
                    + "\n" + "* Agregar el método de obteción del valor unitario del terreno.");
            txaTasacion.setEnabled(true);
        }
    }//GEN-LAST:event_jrbPredetTasacionPropertyChange

    private void jrbAgregarTasacionPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jrbAgregarTasacionPropertyChange
        // TODO add your handling code here:
        if (jrbAgregarTasacion.isSelected()) {
            txaTasacion.setEnabled(true);
        } else {
            txaTasacion.setEnabled(false);
        }
    }//GEN-LAST:event_jrbAgregarTasacionPropertyChange

    private void txfPerimetroActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_txfPerimetroActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txfPerimetroActionPerformed

    private void jbCargarFoto6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbCargarFoto6ActionPerformed
        // TODO add your handling code here:
        seleccionarArchivo(ARCH_FOTOGRAFIA6);
    }//GEN-LAST:event_jbCargarFoto6ActionPerformed

    private void jbCargarFoto7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbCargarFoto7ActionPerformed
        // TODO add your handling code here:
        seleccionarArchivo(ARCH_FOTOGRAFIA7);
    }//GEN-LAST:event_jbCargarFoto7ActionPerformed

    private void jbCargarFoto8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbCargarFoto8ActionPerformed
        // TODO add your handling code here:
        seleccionarArchivo(ARCH_FOTOGRAFIA8);
    }//GEN-LAST:event_jbCargarFoto8ActionPerformed

    private void jbCargarFoto9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbCargarFoto9ActionPerformed
        // TODO add your handling code here:
        seleccionarArchivo(ARCH_FOTOGRAFIA9);
    }//GEN-LAST:event_jbCargarFoto9ActionPerformed

    private void jbCargarFoto10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbCargarFoto10ActionPerformed
        // TODO add your handling code here:
        seleccionarArchivo(ARCH_FOTOGRAFIA10);
    }//GEN-LAST:event_jbCargarFoto10ActionPerformed

    private void jbCargarFoto11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbCargarFoto11ActionPerformed
        // TODO add your handling code here:
        seleccionarArchivo(ARCH_FOTOGRAFIA11);
    }//GEN-LAST:event_jbCargarFoto11ActionPerformed

    private void jbCargarFoto12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbCargarFoto12ActionPerformed
        // TODO add your handling code here:
        seleccionarArchivo(ARCH_FOTOGRAFIA12);
    }//GEN-LAST:event_jbCargarFoto12ActionPerformed

    private void jbCargarFoto3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbCargarFoto3ActionPerformed
        // TODO add your handling code here
        seleccionarArchivo(ARCH_FOTOGRAFIA3);
    }//GEN-LAST:event_jbCargarFoto3ActionPerformed

    private void jbCargarFoto4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbCargarFoto4ActionPerformed
        // TODO add your handling code here:
        seleccionarArchivo(ARCH_FOTOGRAFIA4);
    }//GEN-LAST:event_jbCargarFoto4ActionPerformed

    private void jbCargarFoto1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbCargarFoto1ActionPerformed
        // TODO add your handling code here:
        seleccionarArchivo(ARCH_FOTOGRAFIA1);
    }//GEN-LAST:event_jbCargarFoto1ActionPerformed

    private void jbCargarFoto2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbCargarFoto2ActionPerformed
        // TODO add your handling code here:
        seleccionarArchivo(ARCH_FOTOGRAFIA2);
    }//GEN-LAST:event_jbCargarFoto2ActionPerformed

    private void jScrollPane7InputMethodTextChanged(java.awt.event.InputMethodEvent evt) {//GEN-FIRST:event_jScrollPane7InputMethodTextChanged
        // TODO add your handling code here:

    }//GEN-LAST:event_jScrollPane7InputMethodTextChanged

    private void jtDistribucionPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jtDistribucionPropertyChange
        // TODO add your handling code here:


    }//GEN-LAST:event_jtDistribucionPropertyChange

    private void jtDistribucionMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jtDistribucionMouseClicked
        // TODO add your handling code here:
        List<BEDistribucion> listaDi = new ArrayList<BEDistribucion>();

        for (int i = 0; i < modeloDistribucionAsignado.getRowCount(); i++) {
            listaDi.add(modeloDistribucionAsignado.get(i));
        }
        modeloDistribucionAsignado = new ModeloDistribucionAsignado(listaDi);
        jtDistribucion.setModel(modeloDistribucionAsignado);

        for (int i = 0; i < listaDi.size(); i++) {
            modeloDistribucionAsignado.add(listaDi.get(i));
        }


    }//GEN-LAST:event_jtDistribucionMouseClicked

    private void jdcFechaPropertyChange(java.beans.PropertyChangeEvent evt) {//GEN-FIRST:event_jdcFechaPropertyChange
        // TODO add your handling code here:
        if ((jdcFecha.getDate() != null) && (jdcFecha.getDate().getTime()) <= 0) {
            jdcFecha.setDate(null);
        }
    }//GEN-LAST:event_jdcFechaPropertyChange

    private void jcbDistritoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbDistritoActionPerformed
        // TODO add your handling code here:
        eventoComboDistrito();
    }//GEN-LAST:event_jcbDistritoActionPerformed

    private void jcbProvinciaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbProvinciaActionPerformed
        // TODO add your handling code here:
        eventoComboProvincia();
    }//GEN-LAST:event_jcbProvinciaActionPerformed

    private void jcbDepartamentoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbDepartamentoActionPerformed
        // TODO add your handling code here:
        eventoComboDepartamento();
    }//GEN-LAST:event_jcbDepartamentoActionPerformed


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.ButtonGroup bgMetodologia;
    private javax.swing.ButtonGroup bgObjetivo;
    private javax.swing.ButtonGroup bgTasacion;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel23;
    private javax.swing.JPanel jPanel24;
    private javax.swing.JPanel jPanel25;
    private javax.swing.JPanel jPanel26;
    private javax.swing.JPanel jPanel27;
    private javax.swing.JPanel jPanel28;
    private javax.swing.JPanel jPanel29;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel30;
    private javax.swing.JPanel jPanel31;
    private javax.swing.JPanel jPanel32;
    private javax.swing.JPanel jPanel33;
    private javax.swing.JPanel jPanel34;
    private javax.swing.JPanel jPanel35;
    private javax.swing.JPanel jPanel36;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane10;
    private javax.swing.JScrollPane jScrollPane11;
    private javax.swing.JScrollPane jScrollPane12;
    private javax.swing.JScrollPane jScrollPane14;
    private javax.swing.JScrollPane jScrollPane15;
    private javax.swing.JScrollPane jScrollPane16;
    private javax.swing.JScrollPane jScrollPane17;
    private javax.swing.JScrollPane jScrollPane18;
    private javax.swing.JScrollPane jScrollPane19;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane20;
    private javax.swing.JScrollPane jScrollPane21;
    private javax.swing.JScrollPane jScrollPane22;
    private javax.swing.JScrollPane jScrollPane23;
    private javax.swing.JScrollPane jScrollPane24;
    private javax.swing.JScrollPane jScrollPane25;
    private javax.swing.JScrollPane jScrollPane26;
    private javax.swing.JScrollPane jScrollPane27;
    private javax.swing.JScrollPane jScrollPane28;
    private javax.swing.JScrollPane jScrollPane29;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane30;
    private javax.swing.JScrollPane jScrollPane31;
    private javax.swing.JScrollPane jScrollPane32;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JScrollPane jScrollPane7;
    private javax.swing.JScrollPane jScrollPane8;
    private javax.swing.JScrollPane jScrollPane9;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTabbedPane jTabbedPane2;
    private javax.swing.JButton jbAgregar;
    private javax.swing.JButton jbAgregarDistribucion;
    private javax.swing.JButton jbAgregarEdificacion;
    private javax.swing.JButton jbAgregarInfraestructura;
    private javax.swing.JButton jbBuscar;
    private javax.swing.JButton jbCalcularComplementario;
    private javax.swing.JButton jbCalcularEdificacion;
    private javax.swing.JButton jbCalcularPredio;
    private javax.swing.JButton jbCalcularTerreno;
    private javax.swing.JButton jbCancelar;
    private javax.swing.JButton jbCargarFoto1;
    private javax.swing.JButton jbCargarFoto10;
    private javax.swing.JButton jbCargarFoto11;
    private javax.swing.JButton jbCargarFoto12;
    private javax.swing.JButton jbCargarFoto2;
    private javax.swing.JButton jbCargarFoto3;
    private javax.swing.JButton jbCargarFoto4;
    private javax.swing.JButton jbCargarFoto5;
    private javax.swing.JButton jbCargarFoto6;
    private javax.swing.JButton jbCargarFoto7;
    private javax.swing.JButton jbCargarFoto8;
    private javax.swing.JButton jbCargarFoto9;
    private javax.swing.JButton jbEditar;
    private javax.swing.JButton jbEspecificacionTecnica;
    private javax.swing.JButton jbGuardar;
    private javax.swing.JButton jbQuitarDistribucion;
    private javax.swing.JButton jbQuitarEspecificaconTecnica;
    private javax.swing.JButton jbQuitarInfraestructura;
    private javax.swing.JButton jbQuitarValuacionComplementaria;
    private javax.swing.JButton jbQuitarValuacionEdificacion;
    private javax.swing.JButton jbSalir;
    private javax.swing.JButton jbaAgregarComplementario;
    private javax.swing.JComboBox jcbDepartamento;
    private javax.swing.JComboBox jcbDistrito;
    private javax.swing.JComboBox jcbEstado;
    private javax.swing.JComboBox jcbProvincia;
    private com.toedter.calendar.JDateChooser jdcFecha;
    private javax.swing.JPanel jpLindero;
    private javax.swing.JRadioButton jrbAgregarMeto;
    private javax.swing.JRadioButton jrbAgregarObj;
    private javax.swing.JRadioButton jrbAgregarTasacion;
    private javax.swing.JRadioButton jrbPredetMeto;
    private javax.swing.JRadioButton jrbPredetObj;
    private javax.swing.JRadioButton jrbPredetTasacion;
    private javax.swing.JTable jtComplementario;
    private javax.swing.JTable jtDistribucion;
    private javax.swing.JTable jtEdificacion;
    private javax.swing.JTable jtEspecificacionTecnica;
    private javax.swing.JTable jtInfraestructura;
    private javax.swing.JTable jtPropiedad;
    private javax.swing.JTextArea jtxaImagen1;
    private javax.swing.JTextArea jtxaImagen10;
    private javax.swing.JTextArea jtxaImagen11;
    private javax.swing.JTextArea jtxaImagen12;
    private javax.swing.JTextArea jtxaImagen2;
    private javax.swing.JTextArea jtxaImagen3;
    private javax.swing.JTextArea jtxaImagen4;
    private javax.swing.JTextArea jtxaImagen5;
    private javax.swing.JTextArea jtxaImagen6;
    private javax.swing.JTextArea jtxaImagen7;
    private javax.swing.JTextArea jtxaImagen8;
    private javax.swing.JTextArea jtxaImagen9;
    private javax.swing.JLabel lblFoto1;
    private javax.swing.JLabel lblFoto10;
    private javax.swing.JLabel lblFoto11;
    private javax.swing.JLabel lblFoto12;
    private javax.swing.JLabel lblFoto2;
    private javax.swing.JLabel lblFoto3;
    private javax.swing.JLabel lblFoto4;
    private javax.swing.JLabel lblFoto5;
    private javax.swing.JLabel lblFoto6;
    private javax.swing.JLabel lblFoto7;
    private javax.swing.JLabel lblFoto8;
    private javax.swing.JLabel lblFoto9;
    private javax.swing.JTextArea txaDescripcion;
    private javax.swing.JTextArea txaInscripcion;
    private javax.swing.JTextArea txaLinderoDerecha;
    private javax.swing.JTextArea txaLinderoFondo;
    private javax.swing.JTextArea txaLinderoFrente;
    private javax.swing.JTextArea txaLinderoIzquierda;
    private javax.swing.JTextArea txaMetodologia;
    private javax.swing.JTextArea txaObjetivo;
    private javax.swing.JTextArea txaObservaciones;
    private javax.swing.JTextArea txaPredioCircundante;
    private javax.swing.JTextArea txaTasacion;
    private javax.swing.JTextArea txaViaAcceso;
    private javax.swing.JTextArea txaZonificacion;
    private javax.swing.JTextField txfBuscar;
    private javax.swing.JTextField txfComplementario;
    private javax.swing.JTextField txfDensidad;
    private javax.swing.JTextField txfDireccion;
    private javax.swing.JTextField txfEdificacion;
    private javax.swing.JTextField txfPerimetro;
    private javax.swing.JTextField txfPerito;
    private javax.swing.JTextField txfPropietario1;
    private javax.swing.JTextField txfPropietario2;
    private javax.swing.JTextField txfRegistroPerito;
    private javax.swing.JTextField txfSolicitante;
    private javax.swing.JTextField txfTerreno;
    private javax.swing.JTextField txfUsoUrbano;
    private javax.swing.JTextField txfValorTotalPredio;
    // End of variables declaration//GEN-END:variables

    @Override
    public void _cargarCombos() throws Exception {
        utilUbigeo.defaultSelectedUbigeo("AYACUCHO", "HUAMANGA", "AYACUCHO", jcbDepartamento, jcbProvincia, jcbDistrito);
    }

    @Override
    public void _agregaValidadoresControl() {
        addEnterDoclickEvent(new Object[][]{{txfBuscar, jbBuscar}});
        _addOperationEventsButtons(jbAgregar, jbEditar, jbGuardar, jbCancelar);
        _addRestoreDataEventsTable(jtPropiedad);
        _addSearchEventsButton(jbBuscar);
        addCharacterValidatorEvent(new Object[][]{
            {txfPropietario1, ALFABETICO_CM, 180}});
    }

    @Override
    public boolean _isDatosValidosBE() {
        return isDatosLlenos(new Object[][]{
            {txfPropietario1, "Ingresar el nombre del propietario."}, //            {txfSolicitante, "Ingresar el nombre del solicitante."},
        //            {txfPerito, "Ingresar el nombre del perito."},
        //            {txfRegistroPerito, "Ingresar el registro del perito."},
        //            {jdcFecha, "Seleccionar la fecha."},
        //            {jcbDepartamento, "Seleccionar el departamento."},
        //            {jcbProvincia, "Seleccionar la provincia."},
        //            {jcbDistrito, "Seleccionar el distrito."},
        //            {txfDireccion, "Ingresar la dirección."},
        //            {txfLinderoFrente, "Ingrése los linderos del frente."},
        //            {txfLinderoDerecha, "Ingrése los linderos de la derecha."},
        //            {txfLinderoFondo, "Ingrése los linderos del fondo."},
        //            {txfLinderoIzq, "Ingrése los linderos de la izquierda."},
        //            {txaZonificacion, "Ingrése la zonificación."},
        //            {txfViaAcceso, "Ingrése las vías de acceso."},
        //            {txfDensidad, "Ingrése la densidad."},
        //            {txfPredioCircundante, "Ingrése el predio circundante."},
        //            {txfUsoUrbano, "Ingrése la el uso urbano."},
        //            {txfInscripcion, "Ingrése la inscripción de la propiedad."},
        //            {txaDescripcion, "Ingrése la descripción del predio."},
        //            {txfTerreno, "Ingrése o calcúle el valor del terreno."},
        //            {txfEdificacion, "Ingrése o calcúle el valor de la edificación."},
        //            {txfComplementario, "Ingrése o calcúle el valor complementario."},
        //            {txfValorTotalPredio, "Calcule el valor total."},
        //            {txfPerimetro, "Ingresar el perímetro de la propiedad."},
        //            {jcbEstado, "Seleccione el estado de la propiedad."}
        });
    }

    @Override
    public int _registrarBE() throws Exception {

        be = new BEPropiedad();

        if (jcbDistrito.getSelectedIndex() > 0) {
            be.setUbigeoid(((BEUbigeo) jcbDistrito.getSelectedItem()).getUbigeoid());
        } else {
            be.setUbigeoid(0);
        }

        be.setPropietario1(txfPropietario1.getText());
        be.setDireccion(txfDireccion.getText());
        be.setTerrenoid(idt);

        if (txfComplementario.getText().isEmpty()) {
            be.setValorcomplementario(0.0);
        } else {
            be.setValorcomplementario(Double.parseDouble(txfComplementario.getText()));
        }
        if (txfValorTotalPredio.getText().isEmpty()) {
            be.setValortotalpredio(0.0);
        } else {
            be.setValortotalpredio(Double.parseDouble(txfValorTotalPredio.getText()));
        }
        if (txfEdificacion.getText().isEmpty()) {
            be.setValortotaledificacion(0.0);
        } else {
            be.setValortotaledificacion(Double.parseDouble(txfEdificacion.getText()));
        }

        if (txfEdificacion.getText().isEmpty()) {
            be.setValortotalterreno(0.0);
        } else {
            be.setValortotalterreno(Double.parseDouble(txfTerreno.getText()));
        }

        be.setPropietario2(txfPropietario2.getText());
        be.setSolicitante(txfSolicitante.getText());
        be.setPerito(txfPerito.getText());
        be.setRegistroperito(txfRegistroPerito.getText());
        be.setObjetivo(txaObjetivo.getText());
        be.setMetodologia(txaMetodologia.getText());
        be.setFechavaloracion(Utilitarios.castDate_UTIL_SQL(jdcFecha.getDate()));
        be.setLinderofrente(txaLinderoFrente.getText());
        be.setLinderoderecha(txaLinderoDerecha.getText());
        be.setLinderoizquierda(txaLinderoIzquierda.getText());
        be.setLinderofondo(txaLinderoFondo.getText());
        be.setZonificacion(txaZonificacion.getText());
        be.setViaacceso(txaViaAcceso.getText());
        be.setDensidadpoblacional(txfDensidad.getText());
        be.setPrediocircundante(txaPredioCircundante.getText());
        be.setUsourbano(txfUsoUrbano.getText());
        be.setInscripcion(txaInscripcion.getText());
        be.setDescripcion(txaDescripcion.getText());
        be.setObservacion(txaObservaciones.getText());

        be.setImagen(foto1);
        if (foto1 != null) {
            be.setExtension(getFileExtencion(foto1));
        } else {
            be.setExtension("png");
        }
        if (jcbEstado.getSelectedIndex() > 0) {
            be.setEstado(jcbEstado.getSelectedItem().toString());
        } else {
            be.setEstado("");
        }

        be.setTasacion(txaTasacion.getText());

        if (txfEdificacion.getText().isEmpty()) {
            be.setPerimetro(0.0);
        } else {
            be.setPerimetro(Double.parseDouble(txfPerimetro.getText()));
        }

        be.setImagen2(foto2);
        if (foto2 != null) {
            be.setExtension2(getFileExtencion(foto2));
        } else {
            be.setExtension2("png");
        }
        be.setImagen3(foto3);
        if (foto3 != null) {
            be.setExtension3(getFileExtencion(foto3));
        } else {
            be.setExtension3("png");
        }
        be.setImagen4(foto4);
        if (foto4 != null) {
            be.setExtension4(getFileExtencion(foto4));
        } else {
            be.setExtension4("png");
        }
        be.setImagen5(foto5);
        if (foto5 != null) {
            be.setExtension5(getFileExtencion(foto5));
        } else {
            be.setExtension5("png");
        }
        be.setImagen6(foto6);
        if (foto6 != null) {
            be.setExtension6(getFileExtencion(foto6));
        } else {
            be.setExtension6("png");
        }
        be.setImagen7(foto7);
        if (foto7 != null) {
            be.setExtension7(getFileExtencion(foto7));
        } else {
            be.setExtension7("png");
        }
        be.setImagen8(foto8);
        if (foto8 != null) {
            be.setExtension8(getFileExtencion(foto8));
        } else {
            be.setExtension8("png");
        }
        be.setImagen9(foto9);
        if (foto9 != null) {
            be.setExtension9(getFileExtencion(foto9));
        } else {
            be.setExtension9("png");
        }
        be.setImagen10(foto10);
        if (foto10 != null) {
            be.setExtension10(getFileExtencion(foto10));
        } else {
            be.setExtension10("png");
        }
        be.setImagen11(foto11);
        if (foto11 != null) {
            be.setExtension11(getFileExtencion(foto11));
        } else {
            be.setExtension11("png");
        }

        be.setImagen12(foto12);
        if (foto12 != null) {
            be.setExtension12(getFileExtencion(foto12));
        } else {
            be.setExtension12("png");
        }
        be.setObservacion1(jtxaImagen1.getText());
        be.setObservacion2(jtxaImagen2.getText());
        be.setObservacion3(jtxaImagen3.getText());
        be.setObservacion4(jtxaImagen4.getText());
        be.setObservacion5(jtxaImagen5.getText());
        be.setObservacion6(jtxaImagen6.getText());
        be.setObservacion7(jtxaImagen7.getText());
        be.setObservacion8(jtxaImagen8.getText());
        be.setObservacion9(jtxaImagen9.getText());
        be.setObservacion10(jtxaImagen10.getText());
        be.setObservacion11(jtxaImagen11.getText());
        be.setObservacion12(jtxaImagen12.getText());

        bl.registrar(be);

        int id = bl.obtenerUltimoId();

        if (id != idInicio) {
            JOptionPane.showMessageDialog(this, "Se ha registrado la propiedad.", "Registro de propiedad.", JOptionPane.INFORMATION_MESSAGE);

            //asignar distribucion
            for (BEDistribucion s : modeloDistribucionAsignado.getList()) {
                beAsignacionDistribucion = new BEAsignacionDistribucion();
                beAsignacionDistribucion.setPropiedadid(id);
                beAsignacionDistribucion.setDistribucionid(s.getDistribucionid());
                beAsignacionDistribucion.setCantidad(Integer.toString(s.getCantidad()));
                System.out.println("Esto es la cantidad de distribucion. " + s.getCantidad());
                blAsignacionDistribucion.registrar(beAsignacionDistribucion);
            }

            //asignar infraestructura
            for (BEInfraestructura s : modeloInfraestructuraAsignado.getList()) {
                beAsignacionInfraestructura = new BEAsignacionInfraestructura();
                beAsignacionInfraestructura.setPropiedadid(id);
                beAsignacionInfraestructura.setInfraestructuraid(s.getInfraestructuraid());
                blAsignacionInfraestructura.registrar(beAsignacionInfraestructura);
            }

            //asignar especificaionTecnica
            for (BEEspecificacionTecnica e : modeloEspecificacionTecnicaAsignada.getList()) {
                beEspecificacionAsignada = new BEEspecificacionAsignada();
                beEspecificacionAsignada.setEspecificaciontecnicaid(e.getEspecificaciontecnicaid());
                beEspecificacionAsignada.setPropiedadid(id);
                blEspecificacionAsignada.registrar(beEspecificacionAsignada);
            }

            // contenedor complementario
            for (BEValuacionComplementario s : modeloValuacionComplementario.getList()) {
                beContenedorComplementario = new BEContenedorComplementario();
                beContenedorComplementario.setValuacioncomplementarioid(s.getValuacioncomplementarioid());
                beContenedorComplementario.setPropiedadid(id);
                blContenedorComplementario.registrar(beContenedorComplementario);
            }
            //agrega contenedor contenedoredificacion
            for (BEValuacionEdificacion s : modeloValuacionEdificacion.getList()) {
                beContenedorEdificacion = new BEContenedorEdificacion();
                beContenedorEdificacion.setValuacionedificacionid(s.getValuacionEdificacionId());
                beContenedorEdificacion.setPropiedadid(id);
                blContenedorEdificacion.registrar(beContenedorEdificacion);
            }
            try {
                int reply = JOptionPane.showConfirmDialog(null, "¿Desea generar el reporte?", title, JOptionPane.YES_NO_OPTION);
                if (reply == JOptionPane.YES_OPTION) {
                    generarReporte(id);
                }

            } catch (Exception e) {
                JOptionPane.showMessageDialog(this, "Error al generar reporte", "Reporte", JOptionPane.INFORMATION_MESSAGE);
            }
        } else {
            JOptionPane.showMessageDialog(this, "No se ha registrado la propiedad.", "Reporte", JOptionPane.INFORMATION_MESSAGE);
        }

        _resetControls();
        _deshabilitarControlesDatos();
        _listarBEs();
        return id;

    }

    @Override
    public int _guardarCambiosBE() throws Exception {

        be.setUbigeoid(((BEUbigeo) jcbDistrito.getSelectedItem()).getUbigeoid());
        be.setPropietario1(txfPropietario1.getText());
        be.setDireccion(txfDireccion.getText());
        be.setTerrenoid(idt);
        if (txfComplementario.getText().isEmpty()) {
            be.setValorcomplementario(0.0);
        } else {
            be.setValorcomplementario(Double.parseDouble(txfComplementario.getText()));
        }
        if (txfValorTotalPredio.getText().isEmpty()) {
            be.setValortotalpredio(0.0);
        } else {
            be.setValortotalpredio(Double.parseDouble(txfValorTotalPredio.getText()));
        }
        if (txfEdificacion.getText().isEmpty()) {
            be.setValortotaledificacion(0.0);
        } else {
            be.setValortotaledificacion(Double.parseDouble(txfEdificacion.getText()));
        }

        if (txfEdificacion.getText().isEmpty()) {
            be.setValortotalterreno(0.0);
        } else {
            be.setValortotalterreno(Double.parseDouble(txfTerreno.getText()));
        }
        be.setPropietario2(txfPropietario2.getText());
        be.setSolicitante(txfSolicitante.getText());
        be.setPerito(txfPerito.getText());
        be.setRegistroperito(txfRegistroPerito.getText());
        be.setObjetivo(txaObjetivo.getText());
        be.setMetodologia(txaMetodologia.getText());
        be.setFechavaloracion(Utilitarios.castDate_UTIL_SQL(jdcFecha.getDate()));
        be.setLinderofrente(txaLinderoFrente.getText());
        be.setLinderoderecha(txaLinderoDerecha.getText());
        be.setLinderoizquierda(txaLinderoIzquierda.getText());
        be.setLinderofondo(txaLinderoFondo.getText());
        be.setZonificacion(txaZonificacion.getText());
        be.setViaacceso(txaViaAcceso.getText());
        be.setDensidadpoblacional(txfDensidad.getText());
        be.setPrediocircundante(txaPredioCircundante.getText());
        be.setUsourbano(txfUsoUrbano.getText());
        be.setInscripcion(txaInscripcion.getText());
        be.setDescripcion(txaDescripcion.getText());
        be.setObservacion(txaObservaciones.getText());

        be.setImagen(foto1);
        if (foto1 != null) {
            be.setExtension(getFileExtencion(foto1));
        } else {
            be.setExtension("png");
        }
        if (jcbEstado.getSelectedIndex() > 0) {
            be.setEstado(jcbEstado.getSelectedItem().toString());
        } else {
            be.setEstado("");
        }

        be.setTasacion(txaTasacion.getText());

        if (txfEdificacion.getText().isEmpty()) {
            be.setPerimetro(0.0);
        } else {
            be.setPerimetro(Double.parseDouble(txfPerimetro.getText()));
        }

        be.setImagen2(foto2);
        if (foto2 != null) {
            be.setExtension2(getFileExtencion(foto2));
        } else {
            be.setExtension2("png");
        }
        be.setImagen3(foto3);
        if (foto3 != null) {
            be.setExtension3(getFileExtencion(foto3));
        } else {
            be.setExtension3("png");
        }
        be.setImagen4(foto4);
        if (foto4 != null) {
            be.setExtension4(getFileExtencion(foto4));
        } else {
            be.setExtension4("png");
        }
        be.setImagen5(foto5);
        if (foto5 != null) {
            be.setExtension5(getFileExtencion(foto5));
        } else {
            be.setExtension5("png");
        }
        be.setImagen6(foto6);
        if (foto6 != null) {
            be.setExtension6(getFileExtencion(foto6));
        } else {
            be.setExtension6("png");
        }
        be.setImagen7(foto7);
        if (foto7 != null) {
            be.setExtension7(getFileExtencion(foto7));
        } else {
            be.setExtension7("png");
        }
        be.setImagen8(foto8);
        if (foto8 != null) {
            be.setExtension8(getFileExtencion(foto8));
        } else {
            be.setExtension8("png");
        }
        be.setImagen9(foto9);
        if (foto9 != null) {
            be.setExtension9(getFileExtencion(foto9));
        } else {
            be.setExtension9("png");
        }
        be.setImagen10(foto10);
        if (foto10 != null) {
            be.setExtension10(getFileExtencion(foto10));
        } else {
            be.setExtension10("png");
        }
        be.setImagen11(foto11);
        if (foto11 != null) {
            be.setExtension11(getFileExtencion(foto11));
        } else {
            be.setExtension11("png");
        }
        be.setImagen12(foto12);
        if (foto12 != null) {
            be.setExtension12(getFileExtencion(foto12));
        } else {
            be.setExtension12("png");
        }
        be.setObservacion1(jtxaImagen1.getText());
        be.setObservacion2(jtxaImagen2.getText());
        be.setObservacion3(jtxaImagen3.getText());
        be.setObservacion4(jtxaImagen4.getText());
        be.setObservacion5(jtxaImagen5.getText());
        be.setObservacion6(jtxaImagen6.getText());
        be.setObservacion7(jtxaImagen7.getText());
        be.setObservacion8(jtxaImagen8.getText());
        be.setObservacion9(jtxaImagen9.getText());
        be.setObservacion10(jtxaImagen10.getText());
        be.setObservacion11(jtxaImagen11.getText());
        be.setObservacion12(jtxaImagen12.getText());

        int rsp = bl.actualizarRegistro(be);

        //asignar distribucion
        int idre = model.get(jtPropiedad.getSelectedRow()).getPropiedadid();

        if (!blAsignacionDistribucion.listarAsignacion(idre).isEmpty()) {
            blAsignacionDistribucion.eliminarAsignacion(idre);
        }

        for (BEDistribucion c : modeloDistribucionAsignado.getList()) {
            beAsignacionDistribucion = new BEAsignacionDistribucion();
            beAsignacionDistribucion.setPropiedadid(RetornaIdPropiedad(model.get(jtPropiedad.getSelectedRow())));
            beAsignacionDistribucion.setDistribucionid(c.getDistribucionid());
            beAsignacionDistribucion.setCantidad(Integer.toString(c.getCantidad()));
            blAsignacionDistribucion.registrar(beAsignacionDistribucion);
        }

        //asignar infraestructura
        int idinf = model.get(jtPropiedad.getSelectedRow()).getPropiedadid();
        if (!blAsignacionInfraestructura.listarAsignacion(idinf).isEmpty()) {
            blAsignacionInfraestructura.eliminarAsignacion(idinf);
        }
        for (BEInfraestructura c : modeloInfraestructuraAsignado.getList()) {
            beAsignacionInfraestructura = new BEAsignacionInfraestructura();
            beAsignacionInfraestructura.setPropiedadid(RetornaIdPropiedad(model.get(jtPropiedad.getSelectedRow())));
            beAsignacionInfraestructura.setInfraestructuraid(c.getInfraestructuraid());
            blAsignacionInfraestructura.registrar(beAsignacionInfraestructura);
        }

        //asignar especificaionTecnica
        int idet = model.get(jtPropiedad.getSelectedRow()).getPropiedadid();
        if (!blEspecificacionAsignada.listarAsignacion(idet).isEmpty()) {
            blEspecificacionAsignada.eliminarAsignacion(idet);
        }
        for (BEEspecificacionTecnica s : modeloEspecificacionTecnicaAsignada.getList()) {
            beEspecificacionAsignada = new BEEspecificacionAsignada();
            beEspecificacionAsignada.setPropiedadid(RetornaIdPropiedad(model.get(jtPropiedad.getSelectedRow())));
            beEspecificacionAsignada.setEspecificaciontecnicaid(s.getEspecificaciontecnicaid());
            blEspecificacionAsignada.registrar(beEspecificacionAsignada);
        }

        //asignar edificacion
        int ided = model.get(jtPropiedad.getSelectedRow()).getPropiedadid();
        if (!blContenedorEdificacion.listarAsignacion(ided).isEmpty()) {
            blContenedorEdificacion.eliminarAsignacion(ided);
        }
        for (BEValuacionEdificacion ed : modeloValuacionEdificacion.getList()) {
            beContenedorEdificacion = new BEContenedorEdificacion();
            beContenedorEdificacion.setPropiedadid(RetornaIdPropiedad(model.get(jtPropiedad.getSelectedRow())));
            beContenedorEdificacion.setValuacionedificacionid(ed.getValuacionEdificacionId());
            blContenedorEdificacion.registrar(beContenedorEdificacion);
        }

        //asignar complementario
        int idco = model.get(jtPropiedad.getSelectedRow()).getPropiedadid();
        if (!blContenedorComplementario.listarAsignacion(idco).isEmpty()) {
            blContenedorComplementario.eliminarAsignacion(idco);
        }
        for (BEValuacionComplementario co : modeloValuacionComplementario.getList()) {
            beContenedorComplementario = new BEContenedorComplementario();
            beContenedorComplementario.setPropiedadid(RetornaIdPropiedad(model.get(jtPropiedad.getSelectedRow())));
            beContenedorComplementario.setValuacioncomplementarioid(co.getValuacioncomplementarioid());
            blContenedorComplementario.registrar(beContenedorComplementario);
        }

        //reporte
        try {
            int reply = JOptionPane.showConfirmDialog(null, "¿Desea generar el reporte?", title, JOptionPane.YES_NO_OPTION);
            if (reply == JOptionPane.YES_OPTION) {
                generarReporte(RetornaIdPropiedad(model.get(jtPropiedad.getSelectedRow())));
                System.out.println("Este es el id retornado: " + RetornaIdPropiedad(model.get(jtPropiedad.getSelectedRow())));
            }

        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, "Error al generar reporte", "Reporte", JOptionPane.INFORMATION_MESSAGE);
        }

        _deshabilitarControlesDatos();
        _resetControls();
        _listarBEs();
        return rsp;

    }

    @Override
    public void _listarBEs() throws Exception {
        model.addAll(bl.buscarReferencia(txfBuscar.getText()));
        personalizaVistaTabla();
    }

    @Override
    public void _recuperarDatosBE() throws Exception {
        if (jtPropiedad.getSelectedRow() >= 0) {
            be = model.get(jtPropiedad.getSelectedRow());
            if (be.getUbigeoid() == 0) {

            } else {
                utilUbigeo.recuperarDatosUbigeo(be.getUbigeoid(), jcbDepartamento, jcbProvincia, jcbDistrito);

            }
            txfPropietario1.setText(be.getPropietario1());
            txfDireccion.setText(be.getDireccion());
            idt = be.getTerrenoid();
            System.out.println("Este es el id recuperado. " + idt);
            if (idt != 0) {
                // idt = be.getTerrenoid();
                txfTerreno.setText(Double.toString(blt.buscar(idt).getValortotal()));
                System.out.println("Este es el valor total recuperado");
            }

            txfComplementario.setText(Double.toString(be.getValorcomplementario()));
            txfValorTotalPredio.setText(Double.toString(be.getValortotalpredio()));
            txfEdificacion.setText(Double.toString(be.getValortotaledificacion()));

            txfPropietario2.setText(be.getPropietario2());
            txfSolicitante.setText(be.getSolicitante());
            txfPerito.setText(be.getPerito());
            txfRegistroPerito.setText(be.getRegistroperito());
            txaObjetivo.setText(be.getObjetivo());
            txaMetodologia.setText(be.getMetodologia());
            jdcFecha.setDate(Utilitarios.castDate_UTIL_SQL(be.getFechavaloracion()));
            txaLinderoFrente.setText(be.getLinderofrente());
            txaLinderoDerecha.setText(be.getLinderoderecha());
            txaLinderoIzquierda.setText(be.getLinderoizquierda());
            txaLinderoFondo.setText(be.getLinderofondo());
            txaZonificacion.setText(be.getZonificacion());
            txaViaAcceso.setText(be.getViaacceso());
            txfDensidad.setText(be.getDensidadpoblacional());
            txaPredioCircundante.setText(be.getPrediocircundante());
            txfUsoUrbano.setText(be.getUsourbano());
            txaInscripcion.setText(be.getInscripcion());
            txaDescripcion.setText(be.getDescripcion());
            txaObservaciones.setText(be.getObservacion());

            be = bl.buscar(be.getPropiedadid());
            foto1 = be.getImagen();
            foto2 = be.getImagen2();
            foto3 = be.getImagen3();
            foto4 = be.getImagen4();
            foto5 = be.getImagen5();
            foto6 = be.getImagen6();
            foto7 = be.getImagen7();
            foto8 = be.getImagen8();
            foto9 = be.getImagen9();
            foto10 = be.getImagen10();
            foto11 = be.getImagen11();
            foto12 = be.getImagen12();

            lblFoto1.setIcon(resizeIcon(foto1, 97, 97));
            lblFoto2.setIcon(resizeIcon(foto2, 97, 97));
            lblFoto3.setIcon(resizeIcon(foto3, 97, 97));
            lblFoto4.setIcon(resizeIcon(foto4, 97, 97));
            lblFoto5.setIcon(resizeIcon(foto5, 97, 97));
            lblFoto6.setIcon(resizeIcon(foto6, 97, 97));
            lblFoto7.setIcon(resizeIcon(foto7, 97, 97));
            lblFoto8.setIcon(resizeIcon(foto8, 97, 97));
            lblFoto9.setIcon(resizeIcon(foto9, 97, 97));
            lblFoto10.setIcon(resizeIcon(foto10, 97, 97));
            lblFoto11.setIcon(resizeIcon(foto11, 97, 97));
            lblFoto12.setIcon(resizeIcon(foto12, 97, 97));

            jtxaImagen1.setText(be.getObservacion1());
            jtxaImagen2.setText(be.getObservacion2());
            jtxaImagen3.setText(be.getObservacion3());
            jtxaImagen4.setText(be.getObservacion4());
            jtxaImagen5.setText(be.getObservacion5());
            jtxaImagen6.setText(be.getObservacion6());
            jtxaImagen7.setText(be.getObservacion7());
            jtxaImagen8.setText(be.getObservacion8());
            jtxaImagen9.setText(be.getObservacion9());
            jtxaImagen10.setText(be.getObservacion10());
            jtxaImagen11.setText(be.getObservacion11());
            jtxaImagen12.setText(be.getObservacion12());

            jcbEstado.setSelectedItem(be.getEstado());
            txaTasacion.setText(be.getTasacion());
            txfPerimetro.setText(Double.toString(be.getPerimetro()));

            //asignar distribucion
            modeloDistribucionAsignado.clear();
            ArrayList<BEAsignacionDistribucion> lad = blAsignacionDistribucion.listarAsignacion(be.getPropiedadid());
            for (BEAsignacionDistribucion a : lad) {
                beDistribucion = blDistribucion.buscar(a.getDistribucionid());
                beDistribucion.setCantidad(Integer.parseInt(a.getCantidad()));
                modeloDistribucionAsignado.add(beDistribucion);
            }

            //asignar infraestructura
            modeloInfraestructuraAsignado.clear();
            ArrayList<BEAsignacionInfraestructura> lai = blAsignacionInfraestructura.listarAsignacion(be.getPropiedadid());
            for (BEAsignacionInfraestructura b : lai) {
                beInfraestructura = blInfraestructura.buscar(b.getInfraestructuraid());
                modeloInfraestructuraAsignado.add(beInfraestructura);

            }

            //asignar especificacion
            modeloEspecificacionTecnicaAsignada.clear();
            ArrayList<BEEspecificacionAsignada> let = blEspecificacionAsignada.listarAsignacion(be.getPropiedadid());

            for (BEEspecificacionAsignada m : let) {
                beEspecificacionTecnica = blEspecificacionTecnica.buscar(m.getEspecificaciontecnicaid());
                modeloEspecificacionTecnicaAsignada.add(beEspecificacionTecnica);
            }

            //asignar edificacion
            modeloValuacionEdificacion.clear();
            ArrayList<BEContenedorEdificacion> led = blContenedorEdificacion.listarAsignacion(be.getPropiedadid());

            for (BEContenedorEdificacion m : led) {
                beve = blve.buscar(m.getValuacionedificacionid());
                modeloValuacionEdificacion.add(beve);
            }

            //asignar complementario
            modeloValuacionComplementario.clear();
            ArrayList<BEContenedorComplementario> lco = blContenedorComplementario.listarAsignacion(be.getPropiedadid());
            for (BEContenedorComplementario m : lco) {
                bevc = blvc.buscar(m.getValuacioncomplementarioid());
                modeloValuacionComplementario.add(bevc);
            }

            jbEditar.setEnabled(true);
        }
    }

    @Override
    public void _deshabilitarControlesDatos() {
        disableComponent(new Object[]{
            txfDireccion, txfPropietario1, jcbDepartamento,
            jcbDistrito, jcbProvincia,
            txfPropietario2, txfSolicitante, txfPerito, txfRegistroPerito, jrbPredetObj,
            jrbAgregarObj, txaObjetivo, jrbPredetMeto, jrbAgregarMeto, txaMetodologia,
            jdcFecha, txaLinderoDerecha, txaLinderoFondo, txaLinderoFrente, txaLinderoIzquierda,
            txaZonificacion, jbAgregarInfraestructura, jbQuitarInfraestructura,
            txaViaAcceso, txfDensidad, txaPredioCircundante, txfUsoUrbano, txaInscripcion,
            txaDescripcion, jbAgregarDistribucion, jbQuitarDistribucion,
            jbQuitarValuacionComplementaria, jbQuitarValuacionEdificacion,
            jcbEstado, jbCalcularPredio,
            //contenedor
            txfComplementario, txfEdificacion,
            txfValorTotalPredio, txfTerreno, txaTasacion,
            jbCalcularComplementario, jbCalcularEdificacion, jbCalcularTerreno,
            jbAgregarEdificacion, jbaAgregarComplementario,
            jtComplementario, jtDistribucion, jtEdificacion, jtInfraestructura,
            jtEspecificacionTecnica, jbEspecificacionTecnica, jbQuitarEspecificaconTecnica,
            jrbPredetTasacion, jrbAgregarTasacion, txfPerimetro,
            //observaciones en imagen
            jtxaImagen1, jtxaImagen2, jtxaImagen3, jtxaImagen4, jtxaImagen5, jtxaImagen6, jtxaImagen7, jtxaImagen8,
            jtxaImagen9, jtxaImagen10, jtxaImagen11, jtxaImagen12
        });
        jbCargarFoto1.setEnabled(false);
        jbCargarFoto2.setEnabled(false);
        jbCargarFoto3.setEnabled(false);
        jbCargarFoto4.setEnabled(false);
        jbCargarFoto5.setEnabled(false);
        jbCargarFoto6.setEnabled(false);
        jbCargarFoto7.setEnabled(false);
        jbCargarFoto8.setEnabled(false);
        jbCargarFoto9.setEnabled(false);
        jbCargarFoto10.setEnabled(false);
        jbCargarFoto11.setEnabled(false);
        jbCargarFoto12.setEnabled(false);

    }

    @Override
    public void _habilitarControlesDatos() {
        Utilitarios.enableComponent(new Object[]{
            txfDireccion, txfPropietario1, jcbDepartamento,
            jcbDistrito, jcbProvincia, txaTasacion,
            txfPropietario2, txfSolicitante, txfPerito, txfRegistroPerito, jrbPredetObj,
            jrbAgregarObj, jrbPredetMeto, jrbAgregarMeto,
            jdcFecha, txaLinderoDerecha, txaLinderoFondo, txaLinderoFrente, txaLinderoIzquierda,
            txaZonificacion, jbAgregarInfraestructura, jbQuitarInfraestructura,
            txaViaAcceso, txfDensidad, txaPredioCircundante, txfUsoUrbano, txaInscripcion,
            txaDescripcion, jbAgregarDistribucion, jbQuitarDistribucion, txaObjetivo, txaMetodologia,
            jbQuitarValuacionComplementaria, jbQuitarValuacionEdificacion,
            jcbEstado, jbCalcularPredio,
            //cintenededor
            txfComplementario, txfEdificacion,
            txfValorTotalPredio, txfTerreno,
            jbCalcularComplementario, jbCalcularEdificacion, jbCalcularTerreno,
            jbAgregarEdificacion, jbaAgregarComplementario,
            jtComplementario, jtDistribucion, jtEdificacion,
            jtInfraestructura, jtEspecificacionTecnica,
            jbEspecificacionTecnica, jbQuitarEspecificaconTecnica,
            jrbPredetTasacion, jrbAgregarTasacion, txfPerimetro,
            //observaciones
            jtxaImagen1, jtxaImagen2, jtxaImagen3, jtxaImagen4, jtxaImagen5, jtxaImagen6, jtxaImagen7, jtxaImagen8,
            jtxaImagen9, jtxaImagen10, jtxaImagen11, jtxaImagen12

        });
        // txfValorTotalPredio.setEditable(false);
        jrbPredetMeto.setSelected(true);
        jrbPredetObj.setSelected(true);
        jrbPredetTasacion.setSelected(true);
        if (jrbAgregarObj.isSelected()) {
            txaObjetivo.setEnabled(true);
        } else {
            txaObjetivo.setEnabled(false);
        }
        if (jrbAgregarMeto.isSelected()) {
            txaMetodologia.setEnabled(true);
        } else {
            txaMetodologia.setEnabled(false);
        }
        if (jrbAgregarTasacion.isSelected()) {
            txaTasacion.setEnabled(true);
        } else {
            txaTasacion.setEnabled(false);
        }

        //conetendor
        txfValorTotalPredio.setEditable(false);
        txfEdificacion.setEditable(false);
        txfTerreno.setEditable(false);
        txfComplementario.setEditable(false);

        jbCargarFoto1.setEnabled(true);
        jbCargarFoto2.setEnabled(true);
        jbCargarFoto3.setEnabled(true);
        jbCargarFoto4.setEnabled(true);
        jbCargarFoto5.setEnabled(true);
        jbCargarFoto6.setEnabled(true);
        jbCargarFoto7.setEnabled(true);
        jbCargarFoto8.setEnabled(true);
        jbCargarFoto9.setEnabled(true);
        jbCargarFoto10.setEnabled(true);
        jbCargarFoto11.setEnabled(true);
        jbCargarFoto12.setEnabled(true);
        jdcFecha.setDate(Calendar.getInstance().getTime());

    }

    @Override
    public void _resetControls() {
        Utilitarios.resetComponents(new Object[]{
            txfDireccion, txfPropietario1, jcbDepartamento,
            jcbDistrito, jcbProvincia,
            txfPropietario2, txfSolicitante, txfPerito, txfRegistroPerito, jrbPredetObj,
            jrbAgregarObj, txaObjetivo, jrbPredetMeto, jrbAgregarMeto, txaMetodologia,
            jdcFecha, txaLinderoDerecha, txaLinderoFondo, txaLinderoFrente, txaLinderoIzquierda,
            txaZonificacion, jbAgregarInfraestructura, jbQuitarInfraestructura,
            txaViaAcceso, txfDensidad, txaPredioCircundante, txfUsoUrbano, txaInscripcion,
            txaDescripcion, jbAgregarDistribucion, jbQuitarDistribucion,
            jbQuitarValuacionComplementaria, jbQuitarValuacionEdificacion,
            jcbEstado, jbCalcularPredio,
            //conetendor

            txfComplementario, txfEdificacion,
            txfValorTotalPredio, txfTerreno, txaTasacion,
            jbCalcularComplementario, jbCalcularEdificacion, jbCalcularTerreno,
            jbAgregarEdificacion, jbaAgregarComplementario,
            jtComplementario, jtDistribucion, jtEdificacion, jtInfraestructura, jtEspecificacionTecnica,
            jbEspecificacionTecnica, jbQuitarEspecificaconTecnica,
            jrbPredetTasacion, jrbAgregarTasacion, txfPerimetro, txaObservaciones,
            //observaciones
            jtxaImagen1, jtxaImagen2, jtxaImagen3, jtxaImagen4, jtxaImagen5, jtxaImagen6, jtxaImagen7, jtxaImagen8,
            jtxaImagen9, jtxaImagen10, jtxaImagen11, jtxaImagen12

        });

        //contenedor        
        txfValorTotalPredio.setEditable(false);
        txfEdificacion.setEditable(false);
        txfTerreno.setEditable(false);
        txfComplementario.setEditable(false);
        lblFoto1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
        lblFoto2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
        lblFoto3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
        lblFoto4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
        lblFoto5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
        lblFoto6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
        lblFoto7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
        lblFoto8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
        lblFoto9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
        lblFoto10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
        lblFoto11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
        lblFoto12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));

        jdcFecha.setDate(Calendar.getInstance().getTime());

    }

    private void personalizaVistaTabla() {
        alinearDatosColumnaTablaCentro(0, jtPropiedad);
        alinearDatosColumnaTablaCentro(1, jtPropiedad);

        formateaAnchoColumnaTabla(0, jtPropiedad, 210);
        formateaAnchoColumnaTabla(1, jtPropiedad, 210);

    }

    public void eventoComboDepartamento() {
        if (utilUbigeo != null && jcbDepartamento.getSelectedIndex() > 0) {
            utilUbigeo.eventoComboDepartamento(jcbDepartamento, jcbProvincia, jcbDistrito);
        }
    }

    public void eventoComboProvincia() {
        if (utilUbigeo != null && jcbProvincia.getSelectedIndex() > 0) {
            utilUbigeo.eventoComboProvincia(jcbDepartamento, jcbProvincia, jcbDistrito);
        }
    }

    public void eventoComboDistrito() {
        if (utilUbigeo != null && jcbDistrito.getSelectedIndex() > 0) {
            utilUbigeo.eventoComboDistrito(jcbDepartamento, jcbProvincia, jcbDistrito);
        }
    }

    int idt, ide, idc;

    public void agregarTerreno(BETerreno terreno) {
        bet = terreno;
        String d = Double.toString(redondear(bet.getValortotal()));
        txfTerreno.setText(d);
        idt = bet.getTerrenoid();

    }

    public void agregarEdificacion(BEValuacionEdificacion edificacion) {
        beve = edificacion;

        modeloValuacionEdificacion.add(beve);
        ide = beve.getValuacionEdificacionId();
    }

    public void agregarComplementario(BEValuacionComplementario complementario) {
        bevc = complementario;

        idc = bevc.getValuacioncomplementarioid();
        modeloValuacionComplementario.add(bevc);

    }

    void agregarDistribucion(BEDistribucion componente) {

        //List<BEDistribucion> listaDis = new ArrayList<BEDistribucion>();
        try {
            boolean c = false;
            for (int i = 0; i < modeloDistribucionAsignado.getRowCount(); i++) {
                if (modeloDistribucionAsignado.get(i).getDistribucionid() == componente.getDistribucionid()) {
                    JOptionPane.showMessageDialog(this, "La distribucion ha sido seleccionado antes, por favor seleccione otro.", "Atención", JOptionPane.INFORMATION_MESSAGE);
                    c = true;
                }
            }
            if (c == false) {
                componente.setCantidad(1);
                modeloDistribucionAsignado.add(componente);
//                for (int i = 0; i < modeloDistribucionAsignado.getRowCount(); i++) {
//                    listaDis.add(modeloDistribucionAsignado.get(i));
//                }
//                modeloDistribucionAsignado = new ModeloDistribucionAsignado(listaDis);
//                jtDistribucion.setModel(modeloDistribucionAsignado);
//
//                for (int i = 0; i < listaDis.size(); i++) {
//                    modeloDistribucionAsignado.add(listaDis.get(i));
//                }
            }

        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, "Error al asignar distribucion", "Atención", JOptionPane.INFORMATION_MESSAGE);
        }
    }

    void agregarInfraestructura(BEInfraestructura componente) {
        try {
            boolean c = false;
            for (int i = 0; i < modeloInfraestructuraAsignado.getRowCount(); i++) {
                if (modeloInfraestructuraAsignado.get(i).getInfraestructuraid() == componente.getInfraestructuraid()) {
                    JOptionPane.showMessageDialog(this, "La infraestructura ha sido seleccionado antes, por favor seleccione otro.", "Atención", JOptionPane.INFORMATION_MESSAGE);
                    c = true;
                }
            }
            if (c == false) {
                modeloInfraestructuraAsignado.add(componente);
            }
        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, "Error al asignar infraestructura", "Atención", JOptionPane.INFORMATION_MESSAGE);
        }
    }

    void agregarEspecificacionTecnica(BEEspecificacionTecnica componente) {
        try {
            boolean c = false;
            for (int i = 0; i < modeloEspecificacionTecnicaAsignada.getRowCount(); i++) {
                if (modeloEspecificacionTecnicaAsignada.get(i).getEspecificaciontecnicaid() == componente.getEspecificaciontecnicaid()) {
                    JOptionPane.showMessageDialog(this, "La especificacion tecnica ha sido seleccionado antes, por favor seleccione otro.", "Atención", JOptionPane.INFORMATION_MESSAGE);
                    c = true;
                }
            }
            if (c == false) {
                modeloEspecificacionTecnicaAsignada.add(componente);
            }
        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, "Error al asignar infraestructura", "Atención", JOptionPane.INFORMATION_MESSAGE);
        }
    }

    public int RetornaIdPropiedad(BEPropiedad beec) {
        return beec.getPropiedadid();
    }

    private void generarReporte(int id) {
        String url = "";

        try {
            System.out.println("");
            switch (blt.buscar(bl.buscar(id).getTerrenoid()).getTipovaluacion().toLowerCase().trim()) {

                case "comercial":

                    url = "/org/ing/sisval/report/TerrenoComercial.jasper";
                    break;
                case "reglamentaria":
                    try {
                        switch (blt.buscar(bl.buscar(id).getTerrenoid()).getTipolote().toLowerCase()) {

                            case "con un solo frente a la via publica":
                                try {
                                    switch (blt.buscar(bl.buscar(id).getTerrenoid()).getCaracteristicalote().toLowerCase()) {
                                        case "rectangular":
                                            url = "/org/ing/sisval/report/TerrenoSoloFrenteViaPublica.jasper";
                                            break;
                                        case "irregular":
                                            url = "/org/ing/sisval/report/TerrenoComercial.jasper";
                                            break;
                                    }

                                } catch (Exception e) {
                                    JOptionPane.showMessageDialog(this, "No se pudo identificar la caracteristica de terreno. " + e, "Atención", JOptionPane.INFORMATION_MESSAGE);

                                }
                                break;

                            case "con mas de un frente a la via publica":
                                url = "/org/ing/sisval/report/TerrenoMasFrenteViaPublica.jasper";
                                break;
                            case "con frente a un pasadizo comun o via de dominio privado en condominio":
                                url = "/org/ing/sisval/report/TerrenoFrentePasadizoComun.jasper";
                                break;
                            case "sin acceso por via publica ni privada sino por predio de propiedad de terceros":
                                url = "/org/ing/sisval/report/TerrenoSinAccesoViaPublica.jasper";
                                break;
                            case "restriccion de uso que soporte un predio, derivado de la servidumbre a favor de terceros.":
                                url = "/org/ing/sisval/report/TerrenoRestriccionUso.jasper";
                                break;
                            case "lote con frente inferior al normativo vigente":
                                url = "/org/ing/sisval/report/TerrenoConFrenteInferiorNormativo.jasper";
                                break;
                            case "lote con profundidad menor de quince metros":
                                url = "/org/ing/sisval/report/TerrenoConProfundidad15.jasper";
                                break;
                            case "situado parte en tierra firme y parte en mar":
                                url = "/org/ing/sisval/report/TerrenoParteTierraMar.jasper";
                                break;

                        }
                    } catch (Exception e) {
                        JOptionPane.showMessageDialog(this, "No se pudo identificar el cálculo reglamentario de terreno.", "Atención", JOptionPane.INFORMATION_MESSAGE);
                    }
                    break;
            }

        } catch (Exception e) {
            JOptionPane.showMessageDialog(this, "No se pudo identificar el tipo de valuación de terreno.", "Atención", JOptionPane.INFORMATION_MESSAGE);

        }

        try {
            ReportGeneric report = new ReportGeneric(DSUtil._DSConneccion(parent.getConf()).getConeccion());

            report.setReportParent("/org/ing/sisval/report/");
            JInternalFrame jif = report.mkReportToInternalFrame("ReportePericialComercial",
                    new String[]{"propiedadid", "terreno"},
                    new Object[]{id,
                        this.getClass().getResourceAsStream(url)},
                    "Informe pericial");
            parent.insertarInternalFrame(jif);
            jif.setMaximum(true);

        } catch (PropertyVetoException ex) {
            JOptionPane.showMessageDialog(this, "Error al generar el reporte. Inténtelo nuevamente.", "Atencion", JOptionPane.ERROR_MESSAGE);
            Logger.getLogger(JFPrincipal.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    private void seleccionarArchivo(int op) {
        int rsp = -1;
        switch (op) {
            case ARCH_FOTOGRAFIA1:
                rsp = jfc.showOpenDialog(this);
                if (rsp == JFileChooser.APPROVE_OPTION) {
                    foto1 = jfc.getSelectedFile();

                    lblFoto1.setIcon(resizeIcon(foto1, 97, 97));
                } else {
                    defaultFoto1();

                    lblFoto1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
                }
                break;
            case ARCH_FOTOGRAFIA2:
                rsp = jfc.showOpenDialog(this);
                if (rsp == JFileChooser.APPROVE_OPTION) {
                    foto2 = jfc.getSelectedFile();

                    lblFoto2.setIcon(resizeIcon(foto2, 97, 97));
                } else {

                    defaultFoto2();
                    lblFoto2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));

                }
                break;
            case ARCH_FOTOGRAFIA3:
                rsp = jfc.showOpenDialog(this);
                if (rsp == JFileChooser.APPROVE_OPTION) {
                    foto3 = jfc.getSelectedFile();

                    lblFoto3.setIcon(resizeIcon(foto3, 97, 97));
                } else {

                    defaultFoto3();

                    lblFoto3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
                }
                break;
            case ARCH_FOTOGRAFIA4:
                rsp = jfc.showOpenDialog(this);
                if (rsp == JFileChooser.APPROVE_OPTION) {
                    foto4 = jfc.getSelectedFile();

                    lblFoto4.setIcon(resizeIcon(foto4, 97, 97));
                } else {

                    defaultFoto4();

                    lblFoto4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
                }
                break;
            case ARCH_FOTOGRAFIA5:
                rsp = jfc.showOpenDialog(this);
                if (rsp == JFileChooser.APPROVE_OPTION) {
                    foto5 = jfc.getSelectedFile();

                    lblFoto5.setIcon(resizeIcon(foto5, 97, 97));
                } else {

                    defaultFoto5();

                    lblFoto5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
                }
                break;
            case ARCH_FOTOGRAFIA6:
                rsp = jfc.showOpenDialog(this);
                if (rsp == JFileChooser.APPROVE_OPTION) {
                    foto6 = jfc.getSelectedFile();

                    lblFoto6.setIcon(resizeIcon(foto6, 97, 97));
                } else {

                    defaultFoto6();

                    lblFoto6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
                }
                break;
            case ARCH_FOTOGRAFIA7:
                rsp = jfc.showOpenDialog(this);
                if (rsp == JFileChooser.APPROVE_OPTION) {
                    foto7 = jfc.getSelectedFile();
                    lblFoto7.setIcon(resizeIcon(foto7, 97, 97));
                } else {

                    defaultFoto7();
                    lblFoto7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
                }
                break;
            case ARCH_FOTOGRAFIA8:
                rsp = jfc.showOpenDialog(this);
                if (rsp == JFileChooser.APPROVE_OPTION) {
                    foto8 = jfc.getSelectedFile();
                    lblFoto8.setIcon(resizeIcon(foto8, 97, 97));
                } else {

                    defaultFoto8();

                    lblFoto8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
                }
                break;
            case ARCH_FOTOGRAFIA9:
                rsp = jfc.showOpenDialog(this);
                if (rsp == JFileChooser.APPROVE_OPTION) {
                    foto9 = jfc.getSelectedFile();

                    lblFoto9.setIcon(resizeIcon(foto9, 97, 97));
                } else {
                    defaultFoto9();

                    lblFoto9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
                }
                break;
            case ARCH_FOTOGRAFIA10:
                rsp = jfc.showOpenDialog(this);
                if (rsp == JFileChooser.APPROVE_OPTION) {
                    foto10 = jfc.getSelectedFile();

                    lblFoto10.setIcon(resizeIcon(foto10, 97, 97));
                } else {
                    defaultFoto10();

                    lblFoto10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
                }
                break;
            case ARCH_FOTOGRAFIA11:
                rsp = jfc.showOpenDialog(this);
                if (rsp == JFileChooser.APPROVE_OPTION) {
                    foto11 = jfc.getSelectedFile();

                    lblFoto11.setIcon(resizeIcon(foto11, 97, 97));
                } else {
                    defaultFoto11();

                    lblFoto11.setIcon(new ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
                }
                break;
            case ARCH_FOTOGRAFIA12:
                rsp = jfc.showOpenDialog(this);
                if (rsp == JFileChooser.APPROVE_OPTION) {
                    foto12 = jfc.getSelectedFile();

                    lblFoto12.setIcon(resizeIcon(foto12, 97, 97));
                } else {
                    defaultFoto12();

                    lblFoto12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/ing/sisval/imagen/anonimo.png")));
                }
                break;

        }
    }

    private void defaultFoto1() {
        foto1 = new File("conf" + File.separator + "default.png");
        if (!foto1.exists()) {
            try {
                foto1.createNewFile();
            } catch (IOException ex) {
                JOptionPane.showMessageDialog(this, "Error en imagen por defecto. " + ex, "Atencion", JOptionPane.ERROR_MESSAGE);
                ex.printStackTrace();
            }
        }

    }

    private void defaultFoto2() {
        foto2 = new File("conf" + File.separator + "default.png");

        if (!foto2.exists()) {
            try {
                foto2.createNewFile();
            } catch (IOException ex) {
                JOptionPane.showMessageDialog(this, "Error en imagen por defecto. " + ex, "Atencion", JOptionPane.ERROR_MESSAGE);
                ex.printStackTrace();
            }
        }

    }

    private void defaultFoto3() {
        foto3 = new File("conf" + File.separator + "default.png");

        if (!foto3.exists()) {
            try {
                foto3.createNewFile();
            } catch (IOException ex) {
                JOptionPane.showMessageDialog(this, "Error en imagen por defecto. " + ex, "Atencion", JOptionPane.ERROR_MESSAGE);
                ex.printStackTrace();
            }
        }

    }

    private void defaultFoto4() {
        foto4 = new File("conf" + File.separator + "default.png");

        if (!foto4.exists()) {
            try {
                foto4.createNewFile();
            } catch (IOException ex) {
                JOptionPane.showMessageDialog(this, "Error en imagen por defecto. " + ex, "Atencion", JOptionPane.ERROR_MESSAGE);
                ex.printStackTrace();
            }
        }

    }

    private void defaultFoto5() {
        foto5 = new File("conf" + File.separator + "default.png");

        if (!foto5.exists()) {
            try {
                foto5.createNewFile();
            } catch (IOException ex) {
                JOptionPane.showMessageDialog(this, "Error en imagen por defecto. " + ex, "Atencion", JOptionPane.ERROR_MESSAGE);
                ex.printStackTrace();
            }
        }

    }

    private void defaultFoto6() {
        foto6 = new File("conf" + File.separator + "default.png");

        if (!foto6.exists()) {
            try {
                foto6.createNewFile();
            } catch (IOException ex) {
                JOptionPane.showMessageDialog(this, "Error en imagen por defecto. " + ex, "Atencion", JOptionPane.ERROR_MESSAGE);
                ex.printStackTrace();
            }
        }

    }

    private void defaultFoto7() {
        foto7 = new File("conf" + File.separator + "default.png");

        if (!foto7.exists()) {
            try {
                foto7.createNewFile();
            } catch (IOException ex) {
                JOptionPane.showMessageDialog(this, "Error en imagen por defecto. " + ex, "Atencion", JOptionPane.ERROR_MESSAGE);
                ex.printStackTrace();
            }
        }

    }

    private void defaultFoto8() {
        foto8 = new File("conf" + File.separator + "default.png");

        if (!foto8.exists()) {
            try {
                foto8.createNewFile();
            } catch (IOException ex) {
                JOptionPane.showMessageDialog(this, "Error en imagen por defecto. " + ex, "Atencion", JOptionPane.ERROR_MESSAGE);
                ex.printStackTrace();
            }
        }

    }

    private void defaultFoto9() {
        foto9 = new File("conf" + File.separator + "default.png");

        if (!foto9.exists()) {
            try {
                foto9.createNewFile();
            } catch (IOException ex) {
                JOptionPane.showMessageDialog(this, "Error en imagen por defecto. " + ex, "Atencion", JOptionPane.ERROR_MESSAGE);
                ex.printStackTrace();
            }
        }

    }

    private void defaultFoto10() {
        foto10 = new File("conf" + File.separator + "default.png");

        if (!foto10.exists()) {
            try {
                foto10.createNewFile();
            } catch (IOException ex) {
                JOptionPane.showMessageDialog(this, "Error en imagen por defecto. " + ex, "Atencion", JOptionPane.ERROR_MESSAGE);
                ex.printStackTrace();
            }
        }

    }

    private void defaultFoto11() {
        foto11 = new File("conf" + File.separator + "default.png");

        if (!foto11.exists()) {
            try {
                foto11.createNewFile();
            } catch (IOException ex) {
                JOptionPane.showMessageDialog(this, "Error en imagen por defecto. " + ex, "Atencion", JOptionPane.ERROR_MESSAGE);
                ex.printStackTrace();
            }
        }

    }

    private void defaultFoto12() {
        foto12 = new File("conf" + File.separator + "default.png");
        if (!foto12.exists()) {
            try {
                foto12.createNewFile();
            } catch (IOException ex) {
                JOptionPane.showMessageDialog(this, "Error en imagen por defecto. " + ex, "Atencion", JOptionPane.ERROR_MESSAGE);
                ex.printStackTrace();
            }
        }

    }

    public double redondear(double numero) {
        BigDecimal big = new BigDecimal(numero);
        big = big.setScale(2, RoundingMode.HALF_UP);
        return new Double(big.toString());
    }
}
